Why I didn't get manifest file after using ant build jar? [message #192536] |
Wed, 07 February 2007 16:30 |
Eclipse User |
|
|
|
Originally posted by: www.nospam.net
Hi,
I am learning how to use ant in Eclipse. I have following the Eclipse
Help book: creating a project HW, create HelloWorld.java, ...
In the end, I have my jar file created. But I cannot find manifest file.
So, if I quit Eclipse and try to execute the jar file:
>java -jar HelloWorld.jar
It failed. The error message is:
Failed to load Main-Class manifest attribute from HelloWorld.jar
I googled for answer. Somebody said that Eclipse is very good with this.
"I would recommend you to use an IDE like Eclipse.
It provides you with an JAR Export routine, in which you cal look for
main class.
It automatically creates an MANIFEST.MF"
I cannot understand it. Thank you for your help.
|
|
|
Re: Why I didn't get manifest file after using ant build jar? [message #192565 is a reply to message #192536] |
Wed, 07 February 2007 19:53 |
Eclipse User |
|
|
|
Originally posted by: www.nospam.net
I just used "Export.." to export the project into a jar file. At the
last step, I picked up the main entry point(The Java file that its main
method will be executed when executing jar file). After the jar file was
created, then
>java -jar HelloWorld.jar
works great.
With "Export...", ant in Eclipse seems not much useful at all.
|
|
|
Powered by
FUDForum. Page generated in 0.08133 seconds