473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Building jars in eclipse

hirak1984
316 100+
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
3 3153
r035198x
13,262 8TB
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
316 100+
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
r035198x
13,262 8TB
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

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

Similar topics

1
by: Ted Byers | last post by:
1) I need to support installing a Java application from CD on both Windows AND on the Mac. I have figured out how autorun works on Windows. Is the method for doing this the same on the Mac as it...
1
by: GG | last post by:
Hi all, This is not necessarily an Ant question, nor a standard sun Javac. I am using both, and all suggestions are welcome. I would like to build as many classes as possible from a given...
5
by: Thomas | last post by:
Hi folks, is there any obvious reason why the java compiler cannot load jars from an NTFS filesystem under Linux (Debian) ? I know for sure that the path I specify is correct and I have read...
0
by: Husey | last post by:
Hi, I am trying to create a very simple EJB project which requires me to create a new jboss configuration in Eclipse. I keep getting the error message "An error has occurred. See error log for...
1
by: mario99 | last post by:
I have an application that contains buttons which contain icons and images. When I run the app in Eclipse, they show fine. However, when I create the JAR file and run it, no icon shows, and I don't...
16
by: Ananthu | last post by:
Hi I dont know how to connect mysql with ECLIPSE in RCP application. Please send me the sample code of connecting mysql sever with ECLIPSE in RCP application. Coding Part: RCP Application...
16
by: Lars Uffmann | last post by:
Does anyone have a good suggestion? I am currently using Eclipse Europa with the C-Development Toolkit (plus gnu-toolchain under cygwin) and the Widestudio Native Application Builder plugin. ...
3
by: ravit | last post by:
Hello All, I am trying to execute an application that is developed using eclipse libraries. Jface, SWT , etc. While I execute the application , i have received an exception which I am unable...
1
by: Harris Kosmidhs | last post by:
Hello, I recently installed eclipse with the php plugin. My question is: can eclipse be used in a medium size site where php file include others? Or when you use an MVC approach. To be more...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.