Jar file manifest

From: efinery (hugh_at_efinery.com)
Date: 07/31/04


Date: Fri, 30 Jul 2004 19:40:15 -0400

Is it possible to run a jar file that is contained within another jar file?
I have tried and can't seem to get it to work.
I have the following manifest in test.jar :

Manifest-Version: 1.0
Main-Class: com.efinery.RunTest

This runs fine using "java -jar test.jar" from the command line. However,
when I place it inside a jar called mainapp.jar and have it's manifest
reference test.jar in the Classpath as follows :

Manifest-Version: 1.0
Main-Class: com.efinery.RunTest
Classpath: runme.jar

When I try to run "java -jar mainapp.jar" I get a
java.lang.NoClassDefFoundError. Can anybody tell me what I am doing wrong?
Any help would be much appreciated.



Relevant Pages

  • Re: 2 newbie questions
    ... other ppl have to have those libraries in the system ... I heard that Java is an easily-portable language, ... ..jar file, and distribute with my own Java class? ... or you don't have your CLASSPATH or your PATH variable set ...
    (comp.lang.java.programmer)
  • Re: NoClassDefFoundError after upgrade to FC3
    ... The error below is only if the java file is executed from ... I know that java can't find the correct jar file containing the ... >> sure that they are all in your classpath. ... >> On Behalf Of Cyrus Adkisson ...
    (Fedora)
  • Re: problem running java programs on linux fc3
    ... java examples.jar ... This jar file can have a lot of classes. ... classpath and you have to mention class wich you want to run by it's name. ...
    (comp.lang.java.help)
  • Re: How to update a jar file for one source file change?
    ... I'm new to java, so, I may get terminilogy wrong, bear with me. ... we've got a BIG jar file that includes thousands of classes. ... updated java source code was not being used. ...
    (comp.lang.java.programmer)
  • Re: Jar executable files open in Winzip or save as zip not jar
    ... The file Associations in Windows are fine. ... Windows, it runs with the java runtime application, and the application runs ... Go to Windows Explorer and navigate to any .jar file (perhaps in ... See it that will reset the file association for the jar files. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)