// hi.java
import javax.swing.JOptionPane;
class hi{
public static void main(String args[]){
JOptionPane.showMessageDialog(null,"hi");
}
}

/*
step 1: javac hi.java
step 2: jar cfe hi.jar hi hi.class
step 3: Run it by "java -jar hi.jar". Its running
step 4: If I'm running it by double click error occurs.
ERROR: Could not find the main class. program will exit.
*/