[jdom-interest] Using JDOM with Piccolo from a jar file

Lubowsky, Stephen CECOM RDEC C2D Eclipse Stephen.Lubowsky at mail1.monmouth.army.mil
Wed May 1 11:35:08 PDT 2002


When using crimson or Xerces as the parser I have no trouble running my app
from a jar file. I place my jar and the parser jar in one directory and
create a manifest as follows

Manifest-Version: 1.0
Main-Class: myApp.MyMainClass
Class-Path: crimson.jar

and run the app with java -jar myApp.jar.

I have plugged in Xerces1 Xerces2 and crimson with no problems. Today I have
been trying to get it to run with Piccolo (I like those performance
numbers!) and can not get it to run from the jar. I get the following
exception
org.jdom.JDOMException: Could not load default SAX parser:
org.apache.xerces.parsers.SAXParser: SAX2 driver class
org.apache.xerces.parsers.SAXParser not found:
org.apache.xerces.parsers.SAXParser

I placed Piccolo in jre/lib/ext and it works fine. I can also run it out of
the jar by setting the classpath with the -cp argument like this
java -cp .;D:\MyApp\lib\Piccolo.lib;D:\MyApp\lib\jdom.jar myApp.MyMainClass
Its just running from in the jar that I can seem to figure it out. Anybody
have any ideas on how I can get it to run from a jar without having to place
it in jre/lib/ext? Why should it be any different then using Crimson or
Xerces? I'm using J2SE1.4 if that matters. 

Stephen Lubowsky
Eclipse Networks

 



More information about the jdom-interest mailing list