This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 76650 - Bad URL when opening Show Javadoc with Firefox
Summary: Bad URL when opening Show Javadoc with Firefox
Status: RESOLVED DUPLICATE of bug 104087
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 5.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-21 16:58 UTC by cayhorstmann
Modified: 2007-08-07 15:34 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cayhorstmann 2006-05-21 16:58:55 UTC
I run NB5.5 under Java 1.6.0b84. When I select Show Javadoc, Firefox gives an
error message 

"Cannot execute /usr/bin/firefox. Check that a valid external browser
property is set. From the Tools menu, choose Options. Click Classic View
button, expand IDE Configuration/Server and External Tool Settings node,
then expand Web browsers and choose valid browser".

To diagnose the problem, I defined a "browser" /usr/bin/emacs "{URL}". It is
launched with a URL that is prefixed by the directory from which I launched NB,
e.g. 

/home/cay/http:/cay-t41p:8082/resource/jar%3Afile%3A/usr/local/netbeans....
Comment 1 Max Sauer 2006-05-23 08:37:28 UTC
additional comment from reproter (from nbusers mailing list):

/usr/bin/firefox exists on my machine. Well, whatever, maybe it has 
trouble with the invocation syntax. When I change the configuration 
/usr/bin/firefox -remote "openURL({URL})" to /usr/bin/htmlview {URL}, I 
get the message "Cannot execute /usr/bin/htmlview". Yes, /usr/bin/htmlview
exists too. 

Comment 2 _ rkubacki 2006-05-24 09:53:20 UTC
It would be helpfull if you could run the IDE with following parameter:
-J-Dorg.netbeans.modules.extbrowser=-1

Either pass it from command line or add this to a netbeans.conf file. The output
will give us more clue what's happening.
Comment 3 _ rkubacki 2006-05-24 10:19:35 UTC
What object did you run 'show javadoc' on? I guess it is a zip. file cotaining
documentation.

few comments: for unknown reason we probably translate passed URL into http: and
make it accessible from internal HTTP server. Unfortunately it created something
like /home/cay/http:/cay-t41p:8082/resource/jar%3Afile%3A/usr/local/netbeans....
with strange prefix and missing slash after http:
Comment 4 cayhorstmann 2006-05-24 16:17:25 UTC
I right-clicked on the name of a method. 

I tried the -J-Dorg.netbeans.modules.extbrowser=-1 option, and there was no
difference in behavior. Is there a log file that I should consult? 
Comment 5 _ rkubacki 2006-05-24 16:45:01 UTC
It doesn't change behavior. It only prints some logging into messages.log file
located in your user directory containg IDE specific data (Help|About|Detail
shows where is Userdir).
Comment 6 cayhorstmann 2006-05-24 17:01:46 UTC
Here are the relevant lines from the log file:

[org.netbeans.modules.extbrowser] 1148483527481> init
[org.netbeans.modules.extbrowser] UnixBrowserImpl created from factory:
org.netbeans.modules.extbrowser.FirefoxBrowser@829a91
[org.netbeans.modules.extbrowser] UnixBrowserImpl created from factory:
org.netbeans.modules.extbrowser.FirefoxBrowser@829a91
[org.netbeans.modules.extbrowser] External url:
http://cay-t41p:8082/resource/jar%3Afile%3A/home/apps/netbeans-5.5beta/enterprise3/docs/javaee5-doc-api.zip%21/docs/api/javax/faces/component/UIComponent.html#getValueBinding(java.lang.String)
[org.netbeans.modules.extbrowser] Executable:
org.openide.execution.NbProcessDescriptor@75b33eb1
[org.netbeans.modules.extbrowser] Retried: false
[org.netbeans.modules.extbrowser] Command executed. exitValue = 1

I pasted the URL into firefox, and it worked fine--the page came up. 

Then I tried the following from the shell:

$ firefox -remote
"openURL(http://cay-t41p:8082/resource/jar%3Afile%3A/home/apps/netbeans-5.5beta/enterprise3/docs/javaee5-doc-api.zip%21/docs/api/javax/faces/component/UIComponent.html#getValueBinding(java.lang.String))"
Error: Failed to send command: 500 command not parseable

URL encoding the () works, however.

$ firefox -remote
"openURL(http://cay-t41p:8082/resource/jar%3Afile%3A/home/apps/netbeans-5.5beta/enterprise3/docs/javaee5-doc-api.zip%21/docs/api/javax/faces/component/UIComponent.html#getValueBinding%28java.lang.String%29)"

I then tried "Show Javadoc" on a class name, and that worked fine. So, maybe
encoding the () would do the trick.

I still don't know why I got a crazy URL with Emacs, but, come to think of it,
that may have been a red herring. Maybe Emacs prepended the current directory. 

Comment 7 Tomasz Slota 2006-09-11 17:00:40 UTC
It could be a duplicate of issue 76970. What version of Firefox are you using?

we probably won't address this issue in the 5.5 release, setting target milestone to 'future'
Comment 8 Tomasz Slota 2007-08-07 15:34:14 UTC

*** This issue has been marked as a duplicate of 104087 ***