By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,469 Members | 1,885 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,469 IT Pros & Developers. It's quick & easy.

Building jars in eclipse

hirak1984
100+
P: 316
I have the following error while running a jar file built using eclipse==>
"
Failed to load Main-Class manifest attribute from C:\Documents and Settings\195156\Workspace\tool1.jar "

tool1.jar is the name i have given to the jar file.

The class that contains the "main(String a[])" function is "test2.class"

and i have 4 more classes.I have created a META-INF folder under the project root directory,and created a file named"MANIFEST.MF".
Written the following lines in the file==>
Manifest-Version: 1.0
Main-Class:ZipSelfExtractor

Class-Path: lib/org.eclipse.swt.win32.win32.x86_3.1.1.jar

I cant find the cause of error,please help me with it.
Jan 24 '07 #1
Share this Question
Share on Google+
3 Replies


10K+
P: 13,264
I have the following error while running a jar file built using eclipse==>
"
Failed to load Main-Class manifest attribute from C:\Documents and Settings\195156\Workspace\tool1.jar "

tool1.jar is the name i have given to the jar file.

The class that contains the "main(String a[])" function is "test2.class"

and i have 4 more classes.I have created a META-INF folder under the project root directory,and created a file named"MANIFEST.MF".
Written the following lines in the file==>
Manifest-Version: 1.0
Main-Class:ZipSelfExtractor

Class-Path: lib/org.eclipse.swt.win32.win32.x86_3.1.1.jar

I cant find the cause of error,please help me with it.
The error is showing when you try to run the jar file not when creating the jar file right? Have a look at this.
Jan 24 '07 #2

hirak1984
100+
P: 316
Hey I have followed the steps written in the link,but it still didnt work.I dont know wat to do!!
Jan 24 '07 #3

10K+
P: 13,264
Hey I have followed the steps written in the link,but it still didnt work.I dont know wat to do!!
Make sure that the last line in your mainifest is a blank line. Press enter after the last line.
Jan 24 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.