0

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

Attachments
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);




}




}
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by sathya88
0
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)

Edited by sathya88: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.