2

I want to open new browser window from java desktop application. If browser is already open, then new browser window should open. Every time it should open a separate window.

2

2 Answers 2

2

The builtin mechanism for "opening a browser" would be

Desktop.getDesktop().browse(new URI("http://your.link..."))

Starting a new window / process each time might only be possible if you know the browser being used and know of a parameter to pass to always create new window.

Sign up to request clarification or add additional context in comments.

Comments

1

If you are using windows, this should do the trick:

Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler http://www.google.com");

Hope it helps.

2 Comments

as my browser is already opened, i want to open a separate window. It is opening a new tab in the already opened window.
ah ok...but it's a good option if good performance is needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.