3

Possible Duplicate:
Can Java’s Desktop library launch a URL in a new Browser Tab or Window?

When I run this code in Java it opens a new tab.

String url = "www.google.ca";
java.awt.Desktop.getDesktop().browse(URI.create(url));

I am using google Chrome. Is there a way to open it in a new window instead of a new tab?

Community
  • 1
  • 1
Qwertyfshag
  • 1,029
  • 3
  • 9
  • 6
  • 1
    What makes your web page target ***so special*** that it deserves its own browser window? Note that `"www.google.ca"` is not a valid `URL`, which suggests you are making up code rather than copy/pasting it. – Andrew Thompson Dec 12 '12 at 00:31
  • Canada will be disappointed to find out they no longer have [Google](http://www.google.ca). – Perception Dec 12 '12 at 00:36
  • @Perception your name says it all ;-} – Smit Dec 12 '12 at 00:37

0 Answers0