title: JAR file fails to run due to JFrames or ActionListener or the enum
body: <pre><code>// Java Program to Launch the browser 
  // and open a specific URI 
  import java.awt.*; 
  import javax.swing.*; 
  import java.awt.event.*; 
  import java.net.*; 
  
  
  public class WOAH extends JFrame implements ActionListener{
      
          //Creates a list of constants,,,, these are the names
      private enum Actions {
      Open,
      Close
    }
    
      // frame 
      static JFrame f; 
      
      public static void main(String[] LOLZ){
   
          desk d = new desk(); 
    
          // create a frame 
          f = new JFrame(&quot;Nudes&quot;); 
    
          // create a panel 
          JPanel p = new JPanel(); 
    
          // create a button 
          JButton b = new JButton(&quot;LUNCH&quot;); 
          JButton c = new JButton(&quot;CLOTHS&quot;);
          
          //sets value for Command name
          b.setActionCommand(Actions.Open.name());
          c.setActionCommand(Actions.Close.name());
    
          // add Action Listener 
          b.addActionListener(d); 
          c.addActionListener(d);
    
          p.add(b); 
          p.add(c);
          f.add(p); 
          f.setVisible(true); 
          f.setSize(200, 200);        
      }
      
          // if button is pressed 
      public void actionPerformed(ActionEvent e) 
      { 
          try { 
              if (e.getActionCommand() == Actions.Open.name()) {
                  
              // create a URI 
              URI u = new URI(&quot;www.geeksforgeeks.org&quot;); 
    
              Desktop d = Desktop.getDesktop(); 
              d.browse(u); 
              }
              else if (e.getActionCommand() == Actions.Close.name()) {
              System.exit(0);
              }
          } 
          catch (Exception evt) { 
          } 
      }
  }
  </code></pre>
  <p>I have two sets of code in this set that I am trying to run, for simplicity sake I deleted the lines that ran which use a JOptionPane method.</p>
  <p>My goal is to generate a JAR file but in this line of code I am not sure what the incompatibility is. Could it be the enum list or Action$ list that are saved to an external file? or is it the ActionListener? does anyone have any advice?</p>
  <p>The code runs fine outside of the JAR configuration</p>