Re: JAR file executables and ClassNotFound Exception
This is the second time that I have tried to do this--only to result
in failure again.
If 'being exact and specific' is the goal, you sure have
I am trying to create an executable JAR file. I follow the examples
in the books that I have. I follow the example of my colleagues. I
create a manifest-additions.mf file and add Main-Class: <Class where
main is located> I add all the *.class files as expected but, when I
try to execute the JAR file, I get the "Exception in thread 'main'
java.lang.NoClassDefFoundError: <the name of the Main-Class> ".
1) What is the name of the main() class, and exactly
how is that specified in the manifest?
2) Does the manifest contain a blank line at the end?
3) What is the exact structure of the Jar file, specifically
the paths and names of the manifest file and main class?
4) What command is used to execute the jar file?
Most of these questions could be answered if you
put a small example jar up on a server somewhere
and give us the URL to download and inspect it.
I am sure this is an easy fix and this has been disussed earlier, but
could someone please direct me to the post that talks about what I am
Being vague is the first thing you are doing wrong,
many threads discuss that.
Message posted via JavaKB.com