hi,

am try to create a simple jar file... i got some error to run that jar file

error =" Failed to load Main-Class manifest attribute from
bala.jar"


my code:

import javax.swing.JOptionPane;


public class hello{

public static void main(String args[]){

String s= JOptionPane.showInputDialog("enter name plz....");

JOptionPane.showMessageDialog(null,"hello "+s);

}




}

here am attached that source file and jar file...

jar file here..
http://www.mediafire.com/?op34bzylg93vuwm

What is the jar command you used and did you make a manifest file?

jar -cf bala.jar hello.class

and then manually edit the jar (meta inf MANIFEST file add main class (Main-Class:hello and save the file and update the zip)