Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Why I didn't get manifest file after using ant build jar?
Why I didn't get manifest file after using ant build jar? [message #192536] Wed, 07 February 2007 16:30 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
Previous Topic:html files
Next Topic:Passing variables
Goto Forum:
  


Current Time: Thu Mar 28 09:25:16 GMT 2024

Powered by FUDForum. Page generated in 0.06387 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top