java - open url in chrome browser only

后端 未结 3 899
长发绾君心
长发绾君心 2020-12-19 10:38

I have an url, I am trying to open that url in web view of JavaFX but the content was not compatible with web view. It\'s only compatible to the chrome and firefox. So I wou

3条回答
  •  半阙折子戏
    2020-12-19 10:57

    Runtime.getRuntime().exec(new String[]{"cmd", "/c","start chrome http://goo.gl/EsomR0"});
    

    This worked for me.

    -- Edit: Only worked on Windows

提交回复
热议问题