jar package is running me nuts

Discussion in 'Java' started by groups nope, Feb 22, 2007.

  1. groups nope

    groups nope Guest

    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.
     
    groups nope, Feb 22, 2007
    #1
    1. Advertising

  2. groups nope

    Uwe Plonus Guest

    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
     
    Uwe Plonus, Feb 23, 2007
    #2
    1. Advertising

  3. groups nope

    groups nope Guest

    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 ?
     
    groups nope, Feb 23, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. harry
    Replies:
    1
    Views:
    534
    Sudsy
    Nov 22, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    615
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,767
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,848
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    690
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page