[jdom-interest] Accessing a DTD bundled in a jar file...
patrick at openbase.com
Wed Oct 15 04:01:04 PDT 2003
I am trying to deploy one of my app using Java Web Start. JWS requires
to put resources inside jar files. Since my app use xml files, I
creates a xmlLib.jar file with the following output:
Inside my app, I use a ClassLoader to get xml file Resources as
ClassLoader cl = getClass().getClassLoader();
inputStream = cl.getSystemResourceAsStream("xml/" + fileName);
The problem I have is that my xml file reference the test.dtd file as
<!DOCTYPE PARAM SYSTEM "test.dtd">
I get the following exception when running my app
org.jdom.input.JDOMParseException: Error on line 2: Relative URI
"test.dtd"; can not be resolved without a base URI.
I tried specifying a absolute http path to refer to the dtd file, which
works but this is not really what I want to do. I want to keep my dtd
file inside the jar file.
Thanks in advance,
More information about the jdom-interest