FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
Using the desktop.browse(URI) command. It seems to have problems with the URI if the address contains spaces or other escaped characters. It replaces the escaped characters but when you attempt to open the default browser it attempts to find a file containing the escape characters rather than using the correct file path.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
run the supplied code
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
should open the desired web page
ACTUAL -
Tries to open the page;
C:\Output%20DOC\Default_CSH.htm%231
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.io.IOException:
Failed to open file:/C:/Output%20DOC/Default_CSH.htm%231.
Error message: The system cannot find the path specified.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
File w = new File("C:\\Output DOC\\Default_CSH.htm#1");
URI uri = w.toURI();
desktop = Desktop.getDeskTop();
desktop.browse(uri);
---------- END SOURCE ----------