Problem while creating JAR file for my swing application

Hi...

Using my swings application I am trying to Run different software抯 .

My program is Running fine from command prompt. If I create JAR file

It is giving error like 揊ailed to load Main-Class manifest attribute from .jar?br>Can anybody help me to creating JAR file

Thanks in advance

Cheers

Mallik

[341 byte] By [mallik.83a] at [2007-11-27 8:14:42]
# 1

Hi,

manifest attribute that the error says, is a file containing the version and company of the java compiler used for the java classes, and also specifies the main class of your program. So if you want to be able to run you app only typing:

% java -jar MyJar.jar

You need to specify it when you create the jar file with the flag 'm' (try using jar --help for more info). For example:

% jar cvfm MyJar.jar manifest.MF -C bin .

creates a jar called MyJar.jar with the classes on the directory bin and uses the manifest file manifest.MF. The manifest file looks like:

Manifest-Version: 1.2

Main-Class: org.example.xtreme.ApplicationRun

Created-By: 1.4 (Sun Microsystems Inc.)

Its pointing to the class I use to run my application, called ApplicationRun

gl

Message was edited by:

Xtremebcn

Xtremebcna at 2007-7-12 19:59:19 > top of Java-index,Desktop,Deploying...
# 2
thanks.. i got the solutioncheersmallik
mallik.83a at 2007-7-12 19:59:19 > top of Java-index,Desktop,Deploying...