Intro Eclipse Export JAR

Intro Eclipse Export JAR

這篇介紹在Eclipse Export JAR步驟。

步驟

1
對專案按右鍵 -> Export -> Export -> Java -> JAR file -> Next

JAR Export

1
2
3
4
5
6
7
8
1.Select the export destination:
JAR file:(填要輸出的路徑跟JAR檔名) -> Next -> Next
2.第一次先點選 Generate the manifest file
Save the manifest in the workspace (點選
Manifest file: /專案名/MANIFEST.MF -> Finish
3.編輯好MANIFEST.MF
往後點選 Use existing manifest from workspace:
Manifest file: /專案名/MANIFEST.MF -> Finish

編輯MANIFEST.MF

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
path:META-INF/MANIFEST.MF
file example:
Manifest-Version: 1.0
Class-Path: javax.servlet-api-3.1.0.jar mockito-all-1.9.5.jar slf4j-ap
i-1.7.24.jar log4j-slf4j-impl-2.8.2.jar log4j-api-2.8.2.jar log4j-cor
e-2.8.2.jar ip2locationNew-1.0.0.jar wiremock-jre8-2.25.1.jar guava-2
7.0.1-jre.jar jetty-server-9.4.20.v20190813.jar jetty-http-9.4.20.v20
190813.jar jetty-io-9.4.20.v20190813.jar jetty-servlet-9.4.20.v201908
13.jar jetty-security-9.4.20.v20190813.jar jetty-servlets-9.4.20.v201
90813.jar jetty-continuation-9.4.20.v20190813.jar jetty-util-9.4.20.v
20190813.jar jetty-webapp-9.4.20.v20190813.jar jetty-xml-9.4.20.v2019
0813.jar xmlunit-legacy-2.6.2.jar httpcore-4.4.6.jar httpclient-4.5.3
.jar commons-logging-1.1.1.jar commons-lang3-3.4.jar
Main-Class: com.AppInit

memo:
Class-Path每行有長度限制&注意空格