java项目怎么导出成jar_如何在eclipse将程序导出成jar文件
在編寫好的java包上右鍵--export。
下面是簡(jiǎn)單的一個(gè)java小程序,可以用來(lái)做測(cè)試
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);?? ?}}
總結(jié)
以上是生活随笔為你收集整理的java项目怎么导出成jar_如何在eclipse将程序导出成jar文件的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: python创建追加_Python文件的
- 下一篇: iphone双卡_单卡 iPhone 变