Sam
Sam

Reputation: 27

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

Upvotes: 0

Views: 339

Answers (1)

Αpostolos-Valiakos
Αpostolos-Valiakos

Reputation: 49

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 "});

Upvotes: 1

Related Questions