在编写好的java包上右键--export。
下面是简单的一个java小程序,可以用来做测试
public class Main { public static void main(String[] args) { JFrame frame = new JFrame(); JPanel panel = new JPanel(); JTextArea textArea = new JTextArea(); panel.setLayout(new GridLayout()); textArea.setText(" Hello world...\n Today is "+ new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss").format(new Date())); panel.add(new JScrollPane(textArea)); frame.add(panel); frame.setSize(500, 500); frame.setVisible(true); }}