Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Creating an executable jar file

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Zerbst, Carsten" <Carsten.Zerbst AT PROSTEP.com>
  • To: "Michael Ludwig" <milu71 AT gmx.de>, <XOM-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Creating an executable jar file
  • Date: Mon, 11 May 2009 22:08:43 +0200

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
________________________________________________





Archive powered by MHonArc 2.6.24.

Top of Page