Personal Home page has been migrated to: http://www.blog4app.com
1. Use Eclipse's export. Generates a jar package that specifies the class of the program's entry.
2, because the use of export will not be outside the jar pack, packaged together. So the following actions are needed:
1 For example, create a new folder under/root/test
2 to the 1 generated jar package, copy to the test directory
3 Create a new Lib folder in the test directory
4 Copy all the jar packages used in the project to the Lib directory
5 Open 1 generated jar packages with WinRAR and modify the MANIFEST.MF file below the Meta-inf directory.
Changes to note a few (1) main-class, Class-path Colon after a space (2) Class-path return to the front to have two spaces
To post the MANIFEST.MF I used:
manifest-version:1.0 Main-class:com.socket.server.simplehttpserver Class-path:lib/commons-beanutils-1.8.0.jar Lib/commons-codec-1.3.jar Lib/commons-io-1.4.jar Lib/commons-logging-1.1.1.jar Lib/httpclient-4.0.jar lib/ Httpcore-4.0.1.jar Lib/jcouchdb-1.0.1-1.jar Lib/log4j-1.2.14.jar Lib/slf4j-api-1.6.1.jar Lib/svenson-1.3.8.jar lib/ Slf4j-log4j12-1.6.1.jar