This is on Mac OS X 10.5.5 using JDIC with
Java 1.5 and Firefox is my default browser.
I'm trying to open up an XML file on the local file system using Firefox instead of the default XML viewer(there's a stylesheet). I don't want to set Firefox as my default XML viewer because for another part of this program, I DO want to open XML up with an editor.
Here's some code I've tried along with the results:
Desktop.browse("http://www.cnn.com"); //works fine
Desktop.browse("/Users/iAmAFile.xml");//Malformed URL expection:no Protocol
Desktop.browse("file:///Users/file.xml);
//Desktop Exception: Failed to Launch the Default Browser
//Also, this is what is in the URL bar when I manually open the file with
//firefox
Thanks for your help.
-Sam