Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loading file from jar in webstart 1.5.0_16

843802Aug 12 2008 — edited Jan 12 2009
Hello all,

We have recently updated form 1.5.0_15 to 1.5.0_16. Since the update, our application is bombing when it attempts to read an xml file from a jar in cache.

JDOModin.xml.XMLFileReaderError in building: C:\Documents and Settings\dave.frank\Desktop\jar:lookups\version.xml (The filename, directory name, or volume label syntax is incorrect)
org.jdom.JDOMException: Error in building: C:\Documents and Settings\dave.frank\Desktop\jar:lookups\version.xml (The filename, directory name, or volume label syntax is incorrect)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:306)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:617)
at odin.xml.XMLFileReader.readFile(XMLFileReader.java:53)
at odin.xml.XMLFileReader.<init>(XMLFileReader.java:40)


Clearly the path to the jar file is incorrect.

The url is retrieved like this:
private URL getURL(String filePath)
{
        URL url = getClass().getResource(filePath); // relative path "/lookups/version.xml" 
        return url;
} 
This worked fine in the previous version. Any help would be much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 9 2009
Added on Aug 12 2008
4 comments
145 views