jar package is running me nuts

G

groups nope

Greetings,

I've generated a jar file with a nant script, put all required jars
into the lib dir.

I have this :
home/cy/trading.jar
home/cy/lib/log4j.jar (bogus name) and other jars.

cd /home/cy
java -jar trading.jar -> The jvm cannot cannot find log4.

My manifest file :
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: Prod
Main-Class: com.prod.cy.Launcher
Class-Path: lib/log4j-1.2.11.jar lib/ant-1.6.5.jar lib/ant-antlr-1.6.5
.jar lib/ant-junit-1.6.5.jar lib/ant-launcher-1.6.5.jar lib/antlr-2.7
.6rc1.jar lib/ant-swing-1.6.5.jar lib/asm-attrs.jar lib/asm.jar lib/c
3p0-0.9.0.jar lib/cg./lib-2.1.3.jar lib/cleanimports.jar lib/commons-
collections-2.1.1.jar lib/commons-logging-1.0.4.jar lib/concurrent-1.
3.2.jar lib/connector.jar lib/dom4j-1.6.1.jar lib/ehcache-1.1.jar lib
/hibernate3.jar lib/jaas.jar lib/jacc-1_0-fr.jar lib/jaxen-1.1-beta-7
.jar lib/jboss-cache.jar lib/jboss-common.jar lib/jboss-jmx.jar lib/j
boss-system.jar lib/jdbc2_0-stdext.jar lib/jgroups-2.2.8.jar lib/jta.
jar lib/junit-4.1.jar lib/mysql-connector-java-5.0.3-bin.jar lib/osca
che-2.1.jar lib/persistence.jar lib/proxool-0.8.3.jar lib/swarmcache-
1.0rc2.jar lib/syndiag2.jar lib/versioncheck.jar lib/xerces-2.6.2.jar
lib/xml-apis.jar

Yes, all jars are contained in lib and it stumbles on log4J.

I moved trading.jar to lib and java -cp lib/trading.jar:lib/
log4j.jar : it finds log4j and complains about not finding the next
jar file, of course.

What's wrong with my manifest file ?

OS : Mac OS X and Linux ubuntu.

Many thanks for your help.
 
U

Uwe Plonus

groups said:
Greetings,

I've generated a jar file with a nant script, put all required jars
into the lib dir.

I have this :
home/cy/trading.jar
home/cy/lib/log4j.jar (bogus name) and other jars.

cd /home/cy
java -jar trading.jar -> The jvm cannot cannot find log4.

My manifest file :
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: Prod
Main-Class: com.prod.cy.Launcher
Class-Path: lib/log4j-1.2.11.jar lib/ant-1.6.5.jar lib/ant-antlr-1.6.5

Yes, all jars are contained in lib and it stumbles on log4J.

I moved trading.jar to lib and java -cp lib/trading.jar:lib/
log4j.jar : it finds log4j and complains about not finding the next
jar file, of course.

Why are you writing lib/log4j-1.2.11.jar in your manifest?

How is the file called in yout lib-directory? log4j.jar or log4j-1.2.11.jar?

Uwe
 
G

groups nope

thanks for your answer.

The correct names of the jar files are those provided in the manifest
file.
These jars are contained in the lib dir.

Any hints ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top