Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > jar package is running me nuts

Reply
Thread Tools

jar package is running me nuts

 
 
groups nope
Guest
Posts: n/a
 
      02-22-2007
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.

 
Reply With Quote
 
 
 
 
Uwe Plonus
Guest
Posts: n/a
 
      02-23-2007
groups nope wrote:
> 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
 
Reply With Quote
 
 
 
 
groups nope
Guest
Posts: n/a
 
      02-23-2007
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 ?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java -cp a.jar -jar b.jar => Works on Windows, not on Debian cyberco Java 4 02-14-2006 06:27 AM
jaas.jar, jta.jar jdbc-stdext.jar missing from jdk1.5 RPM muttley Java 0 10-20-2005 02:40 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters Java 0 01-05-2005 10:59 PM
Differences of xercesImpl.jar, xercesImpl-J.jar, dom3-xercesImpl.jar ? Arnold Peters XML 0 01-05-2005 10:59 PM
Package jar files inside EJB jar file? harry Java 1 11-22-2004 10:11 PM



Advertisments