title: How to export as runnable desktop application java?
body: <p>I have use eclipse export and exported this as jar file, but it's working fine inside the eclipse test run, but not working as jar file, any one help me? (i'm new for java, this is my first app)</p>
  
  <pre><code>package com.java.folder;
  import java.awt.*;
  import java.awt.event.*;
  import java.io.File;
  import javax.swing.*;
  
  public class javafolder extends JApplet implements ActionListener{
      private String textLine = "";
      JButton  b1, b2;
      TextField text1, text2;
      Container content = getContentPane();
  
      public void init() {
         text1 = new TextField(8);
         text2 = new TextField(8);
         JLabel label = new JLabel("Folder Name");
         label.setFont(new Font("Serif", Font.PLAIN, 12));
         content.add(label);
         add(text1);
  
         content.setBackground(Color.white);
         content.setLayout(new FlowLayout()); 
  
         b1 = new JButton("Creat A Folder");
         b1.addActionListener(this);
         content.add(b1);
  
         b2 = new JButton("Creat A Folder");
         b2.addActionListener(this);
         //content.add(b2);
      }
  
      // Called when the user clicks the button 
      public void actionPerformed(ActionEvent event) {
          String s;
          textLine = event.getActionCommand();
          s = text1.getText();
          String path = System.getProperty("user.dir");
          File dir=new File(path+"/"+s);
          if(dir.exists()){
              JOptionPane.showMessageDialog(null, "Folder Name Already Exists!!! :(", "Error",
              JOptionPane.ERROR_MESSAGE);
  
          }else{
              dir.mkdir();
              JOptionPane.showMessageDialog(null, "Folder Created :) Folder path:"+dir, "INFORMATION_MESSAGE",
              JOptionPane.INFORMATION_MESSAGE);
          }
      }
  
  }
  </code></pre>