You can try the following:

 URLDisplayer.getDefault().showURL(URL url);


In NetBeans platform, this opens in internal Swing web browser.

In NetBeans IDE, this opens in system's default web browser.

The module responsible for opening systems's default web browser is org-netbeans-modules-extbrowser.jar If u install this module in netbeans platform, then you can open system's default browser from the platform also.