java项目怎么导出成jar_如何在eclipse将程序导出成jar文件
生活随笔
收集整理的這篇文章主要介紹了
java项目怎么导出成jar_如何在eclipse将程序导出成jar文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在編寫好的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);?? ?}}
總結
以上是生活随笔為你收集整理的java项目怎么导出成jar_如何在eclipse将程序导出成jar文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python创建追加_Python文件的
- 下一篇: springboot python 开发