利用 Eclipse 製作可執行 Jar

利用 Eclipse 製作可執行 Jar

Step 1: 點擊該專案右鍵 > Export

image 

Step 2: 選擇 Runnable JAR file

image

Step 3: Launch configuration 設定程式進入點(Main), Export destination 設定匯出 JAR file 路徑(包含檔名), 點選 Finish 後即可自動匯出並自動設定 MANIFEST.MF

image

Step 4: Command line > 進入 Jar file 目錄 > 執行 "java -jar Test_20130520.jar"

 

其它打包 JAR file 方法: http://lijun0349-163-com.iteye.com/blog/1026839