Closed Bug 491349 Opened 15 years ago Closed 14 years ago

Exception if FF is Default Browser and you want to open URL from java using Desktop.getDesktop().browse()

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
critical

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: scepticx, Unassigned)

Details

(Whiteboard: [CLOSEME 2010-11-01])

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729)

This is what happens:

If you have Firefox set as your default browser in Windows Vista and you have UAC turned ON and you are launching a java-application that is placed in the USERDIR/AppData/LocalLow directory by default and that java application is wrapped into an .exe application (using a wrapper like launch4j or jSmooth) and you want to open an URL from inside the application you have to use 

Desktop.getDesktop().browse("http://www.google.com");

This works on all browsers (IE, Safari, Chrome, Opera) except Firefox because FF throws the following exception:

java.io.IOExcpetion: Failed to open http://www.google.com. Error Message: The system can not find the file specified.
        at sun.awt.windows.WDesktopPeer.ShellExecute(Unknown Source)
        at sun.awt.windows.WDesktopPeer.browse(Unknown Source)
        at java.awt.Desktop.browse(Unknown Source)
        at OpenBrowserTest.main(OpenBrowserTest.java:24)



Reproducible: Always

Steps to Reproduce:
1. Build the following Code using the attached build script
2. Copy the resulting EXE to %USERDIR%/AppData/LocalLow
3. Set FireFox as your default Browser
4. Execute the .exe file

Actual Results:  
Firefox does not open the URL.

Expected Results:  
Firefox opens the URL.
Attached file The Java TestCase
The Java Class of the testCase to reproduce the bug
Use this to build the TestCase
This is the launch4j config file for building the TestCase (make sure you have downloaded launch4j from http://launch4j.sourceforge.net)
This is a mass search for bugs which are in the Firefox General component, are
UNCO, have not been changed for 500 days and have an unspecified version. 

Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
No reply from reporter, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: