国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
Fat Jar Eclipse Plug-In Tutorial

Fat Jar Eclipse Plug-In Tutorial


Step 1: Create a new Java Project "demolib"

Create a new Java Project named "demolib".
Add the Class "demolib.DemoLib.java" containing the following code:

package demolib;            public class DemoLib {            public static void sayHello() {            System.out.println("Hello");            }            }            

The Project should look something like this:


Step 2: Create a jar file using Fat Jar Plug-In

In the "Package-Explorer" (not the "Resource-View") right click on the project "demolib".
Select "+ Build Fat Jar".

A Configuration Dialog appears. Just press "Finish".

The File "demolib_fat.jar" has been created in the project root directory.


Step 3: Create a new Java-Project "demorun"

Create a new Java Project named "demorun".
In the project properties add the Library "demolib/demolib_fat.jar" to the Java Build Path":


Step 4: Create Main Class

Add the Class "demorun.DemoRunMain.java" containing the following code:

package demorun;            import demolib.DemoLib;            public class DemoRunMain {            public static void main(String[] args) {            DemoLib.sayHello();            }            }            

The Project should look something like this:


Step 5: Start the Build Fat Jar Dialog

Start the Export Wizard from the File-Menu ("File" -> "Export").
Select "+ Fat Jar Exporter" and click "next >".

Select the project "demorun" and click "next >".

A Configuration-Dialog appears showing the current Settings.


Step 6: Select the Main Class

The Main Class - the one containing the static methode main - must be defined in the jar.
Click on the "Browse..." Button on the right side behind the Main-Class Edit field.

Select "DemoRunMain" and click the "OK" Button.
The FullyQualifiedName "demorun.DemoRunMain" is now set for "Main-Class".


Step7: Finish

Save the current Settings by clicking on the "Finish" Button.

The File "demorun_fat.jar" has been created in the project root directory.
In addition the file ".fatjar" storing the configuration settings has been created in the project root directory

The created jar file contains all classes from all referenced jar files (demolib_fat.jar) and the project classes.
This file can be executed anywhere, no classpath has to be set, because all necessary libraries
are extracted inside the "Fat Jar":

> java -jar demorun_fat.jar            Hello            

back



本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
打包*.war和*.jar文件
將packages/apps/下的app導(dǎo)入eclipse
Eclipse不能重新編譯
不顯示刪除回復(fù)顯示所有回復(fù)顯示星級(jí)回復(fù)顯示得分回復(fù) MyEclipse6.0編譯后的類無法自動(dòng)發(fā)不到WebRoot/WEB-INF/classes文件夾下
Problems using Rhino on Android
如何將android源碼生成eclipse可用的jar包
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服