[XOM-interest] Creating an executable jar file

Zerbst, Carsten Carsten.Zerbst at PROSTEP.com
Mon May 11 16:08:43 EDT 2009


Hello Michael, 

you may use a java -jar with the 
option
-Djava.ext.dirs=$directory_containing_jars

This puts all jars found in the given directories to the classpath

Bye, Carsten 

-----Ursprüngliche Nachricht-----
Von: xom-interest-bounces at lists.ibiblio.org im Auftrag von Michael Ludwig
Gesendet: Mo 11.05.2009 21:46
An: XOM-interest at lists.ibiblio.org
Betreff: Re: [XOM-interest] Creating an executable jar file
 
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
_______________________________________________
XOM-interest mailing list
XOM-interest at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest

________________________________________________
PROSTEP ITS GmbH, Dolivostr.11, D-64293 Darmstadt
HR: Amtsgericht Darmstadt, HRB 8805
Geschäftsführung: Dr. Markus Sachers, Reinhard Betz 
________________________________________________



More information about the XOM-interest mailing list