P
PhilBray
Hello,
I am having an absolute nightmare trying to get a JAR file that I built
within Eclipse to run via a double click windows environment. I know
that the problem relates back to my CLASSPATH but I am having no luck
at all resolving the issue.
I have about 15 external JAR files that I need to reference from my JAR
and therefore I need to setup a CLASSPATH that will point to all the
external JAR's. I have tried building a manifest file by hand and I
have tried all the CLASSPATH configuration settings that I can find.
Everytime I keep getting a java.lang.NoClassDefFoundError after running
the following command:
java -jar myjarfile.jar
The NoClassDefFoundError relates to a class that exists within one of
my external JAR files. When I use Eclipse to create the JAR it does not
seem to add any 'Class-Path' attribute to it and when I add it myself
Eclipse complains about invalid header sections e.g.
Manifest-Version: 1.0
Class-Path: lib\external_jar_one.jar
Main-Class: com.myapp.mainclass
Does anybody have an easy step by step approach that I can follow that
will get me where I want to be? I will be forever greatful.
Many thanks in advance,
Phil
I am having an absolute nightmare trying to get a JAR file that I built
within Eclipse to run via a double click windows environment. I know
that the problem relates back to my CLASSPATH but I am having no luck
at all resolving the issue.
I have about 15 external JAR files that I need to reference from my JAR
and therefore I need to setup a CLASSPATH that will point to all the
external JAR's. I have tried building a manifest file by hand and I
have tried all the CLASSPATH configuration settings that I can find.
Everytime I keep getting a java.lang.NoClassDefFoundError after running
the following command:
java -jar myjarfile.jar
The NoClassDefFoundError relates to a class that exists within one of
my external JAR files. When I use Eclipse to create the JAR it does not
seem to add any 'Class-Path' attribute to it and when I add it myself
Eclipse complains about invalid header sections e.g.
Manifest-Version: 1.0
Class-Path: lib\external_jar_one.jar
Main-Class: com.myapp.mainclass
Does anybody have an easy step by step approach that I can follow that
will get me where I want to be? I will be forever greatful.
Many thanks in advance,
Phil