Hello!

In my NetBeans platform application, I would like to display some Javadoc for a 
helper class in a separate tab using the internal NetBeans browser.  The 
Javadoc is bundled up with the application.
Opening a URL in the internal browser is described at 
https://netbeans.apache.org/wiki/main/wiki/DevFaqHowToOpenURL/

My code looks like:
URL url1 = di1.getClass().getResource("/index.html");
HtmlBrowser.URLDisplayer.getDefault().showURL(url1);

This opens up in a tab within my application with the note "JavaScript is 
disabled on your browser".  Unfortunately the Javadoc, while it does basically 
work, is not rendered properly, and as such does not look nice and doesn't seem 
to function well without javascript.

The link in the internal browser's address bar (running in debug mode) is
jar:file:/C:/Users/jhuber/Documents/source/java/netbeans15/ProSuite/build/cluster/modules/ext/cond-javadoc.jar!/com/stanref/st/cond/package-summary.html

I could use
HtmlBrowser.URLDisplayer.getDefault().showURLExternal(url1);
to open the default system browser, but the external system browser can't deal 
with the abovet URL.  Also, if possible, I would prefer to use the internal 
browser in tab within my app.

Is there a way to enable javascript in the internal NetBeans browser?

>From within the NetBeans IDE, if I examine the jar file that contains the 
>javadoc, right-click on index.html and select "View", the Javadoc is opened in 
>the external browser with link below;  it looks great and works fine.  So if 
>the internal browser can't do javascript, is there a way to emulate what the 
>NetBeans IDE's "View" command is doing to modify the URL so it can be used in 
>the external browser?

http://127.0.0.1:8082/resource/jar%3Afile%3A/C%3A/Users/jhuber/Documents/source/java/netbeans15/ProSuite/cond/release/modules/ext/cond-javadoc.jar%21/com/stanref/st/cond/package-summary.html

Thank You!

Joe Huber
Standard Refrigeration LLC



Reply via email to