[XOM-interest] Creating an executable jar file

Michael Ludwig milu71 at gmx.de
Mon May 11 15:46:19 EDT 2009


Scott Brush schrieb am 10.05.2009 um 18:23:47 (-0700):
> I'm trying to create an executable .jar file for an application using
> classes from XOM to read and write to XML files.  When I try to run
> the .jar file I create with the java -jar command I get an error
> message saying that one of the XOM classes can't be found.  The error
> is java.lang.noClassDefFound error.

The manpage for the Java VM states:

  -jar [...] When you use this option, the JAR file is the source of all
       user classes, and other user class path settings are ignored.

> The application runs fine when I run it with the standard java command
> using the main class.

So this may be the issue here.

Michael Ludwig


More information about the XOM-interest mailing list