File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Properly Setting up a Manifest file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Properly Setting up a Manifest file" Watch "Properly Setting up a Manifest file" New topic
Author

Properly Setting up a Manifest file

Scott Kimberly
Greenhorn

Joined: Mar 04, 2012
Posts: 25
Im fairly confident that im having trouble with my JAR file creation because i cant get the Manifest file right.

I have 1 .java file that i want to make into a JAR. It is located here: C:\Users\scott\headfirst java workspace\headfirst java\src\chatClient\SimpleChatClient

The Manifest file is in the same directory, ie -> C:\Users\scott\headfirst java workspace\headfirst java\src\chatClient\Manifest

My Manifest file reads as follows:


It has the return at the end. Ive tried leaving it as just Main-Class: SimpleChatClient and also putting the full extension like i did above.

Where am i going wrong?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18993
    
    8

You just put the class name there. That includes the package name, if you put the class in a package, but not the ".class" file extension. Where the class happens to have come from, in your IDE's directories, is irrelevant to the jar and its users.
Scott Kimberly
Greenhorn

Joined: Mar 04, 2012
Posts: 25
Paul Clapham wrote:You just put the class name there. That includes the package name, if you put the class in a package, but not the ".class" file extension. Where the class happens to have come from, in your IDE's directories, is irrelevant to the jar and its users.


Thanks!

I changed it to the package.javaclass (with no extension of course) and it worked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Properly Setting up a Manifest file