Skip to content
Advertisement

How to force JAVA app to open the page in specific browser

When I add microsoft-edge prefix to the URL(microsoft-edge:https://google.com) it opens the page in edge regardless what browser i am using to run the app. Is there an equivalent prefix for chrome and Firefox ?

Thank you in advance

Advertisement

Answer

If you are using Java and you want to run a certain browser with a certain link the only solution i can possibly think is using CMD

Runtime.getRuntime().exec(new String[]{"cmd", "/c","start chrome your_ link "});
Advertisement