Failed to load Main-Class manifest attribute from IWS.jar

I have a problem that when I click the IWS.jar in dist folder, there is an error

"Failed to load Main-Class manifest attribute from IWS.jar"

i have search in internet with same case, they said to add a line

"Main-Class: summary" in manifest.mf, so i have extract the .jar

and open the manifest.mf file, but it said that main class will add automatically

Manifest-Version: 1.0

Ant-Version: Apache Ant 1.6.2

Created-By: 1.5.0_06-b05 (Sun Microsystems Inc.)

X-COMMENT: Main-Class will be added automatically by build

I am using Netbeans1.4 and jdk1.5.0_06 to create java application.

How should I fix it?

Thanks

[683 byte] By [suhyea] at [2007-11-26 22:50:12]
# 1
Just remove the lineX-COMMENT: Main-Class will be added automatically by buildand replace it withMain-Class: YourMainClassOf course, if your main class is in a certain package, you need to add the package before the main-class as well.
prometheuzza at 2007-7-10 12:11:16 > top of Java-index,Java Essentials,Java Programming...
# 2

Thanks for the reply..

I have fix it.

Actually why I got the error is because I used panel form to create GUI form.

So I try create new file using frame form rather than panel. It will generate this main class.

public static void main(String args[]) {

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new NewJFrame().setVisible(true);

}

});

}

Thats why my .jar fail to load when I used panel form because its does not have main class in it.

suhyea at 2007-7-10 12:11:16 > top of Java-index,Java Essentials,Java Programming...