Re: connecting to jar files - how hard can I make it?
- From: steve <steve@xxxxxxx>
- Date: Mon, 29 May 2006 05:36:05 +0800
On Mon, 29 May 2006 03:16:40 +0800, Doug wrote
(in article <pan.2006.05.28.19.16.39.679083@xxxxxxxxxxxxxxxxxxx>):
Hi folks
I'm having a wee problem linking to external jar files.
My mf file looks like this:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.5.0_05-b05 (Sun Microsystems Inc.)
Main-Class: Main
Class-Path: jdom.jar mysql-connector-java-3.1.12-bin.jar
I run the app using this:
java -jar -cp ./ ./webadmin/dist/lib/webadmin.jar
A local command:
bash-3.00$ file mysql-connector-java-3.1.12-bin.jar jdom.jar
mysql-connector-java-3.1.12-bin.jar:\
Zip archive data, at least v1.0 to
extract jdom.jar: \
Zip archive data, at least
v1.0 to extract
the result is:
Starting up
Loading XML
Exception in thread "main" java.lang.NoClassDefFoundError:\
org/jdom/input/SAXBuilder
at Parameters.load(Unknown Source)
at Main.main(Unknown Source)
I have twiddled with things to reverse the calling order of jdom & the
mysql stuff but the same error comes up with the different jar.
What have I done to make this so difficult?
Thanks for your time.
dkr
just because something is in the manifest , does not make it on the class
path.
just for a test , try a full class-path, instead of trying a "local" , I.E
the full directory path from root.
.
- Follow-Ups:
- References:
- Prev by Date: connecting to jar files - how hard can I make it?
- Next by Date: Re: connecting to jar files - how hard can I make it?
- Previous by thread: connecting to jar files - how hard can I make it?
- Next by thread: Re: connecting to jar files - how hard can I make it?
- Index(es):
Relevant Pages
|
|