I’m trying to build executable jar file. I’m fairly new to this and not really sure how it is suppose to work. I’m using eclipse 64 bit and windows 7. I’m exporting the project to jar file. This is project code. when I double click the file it doesn’t do anything and I’m expecting to see a message box. Can you please tell me what am I doing wrong and help me fix it. thanks.
import javax.swing.*;
public class Starter {
public static void main(String[] args)
{
String st="Welcome";
JOptionPane.showMessageDialog(null,st);
}
}
It sounds as if there is no Main-Class defined in the MANIFEST.MF in your jar file.
There are numerous guides on how to create an executable jar available such as this one.