aims
Executable Jar package tool package:
- The third-party libraries imported Jar
- Adding resource files
Implementation process
principle
Principle 1 Jar package
The third-party library files are also packaged into an executable Jar package, the implementation does not depend on external libraries, which can be placed in execution
All class files are extracted third party libraries into an executable Jar package
Jar packaging principle 2
1. Complete the entire third-party add Jar Jar package executable within
all class files 2. eclipse achieve load executable Jar Jar package third-party libraries into an executable Jar Jar library to extract the package
2. Modify the MANIFEST.MF , modify the entry class, modified to org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
here, by the eclipse to achieve their own class to load third-party libraries Jar
Jar packaging principle 3
Third-party library to extract Jar Jar under the same directory as the executable package, modify the MANIFEST.MF file Class-Path
attribute to load executable Jar Jar package external libraries
Packing algorithm
Principle 1 Jar package
1. Export item Jar File into the Runnable
2. Select class entry, the specific export file location
3. handle third-party libraries, all library file to extract class files into the executable Jar package, select Extra required libraries into generated JAR
4.Finsh
Jar packaging principle 2
1. Export item Jar File into the Runnable
2. Select class entry, the specific export file location
3. handle third-party libraries, the entire packet to extract the third-party libraries into executable Jar Jar package, selecting Library handling
the second option
4.Finsh
Jar packaging principle 3
1. Project Export to File Jar Runnable
2. Select the entry class, the specific location of the export file
3. Third-party libraries deal with, choose Library handling
the third option
4.Finsh
Resources Import
add manully
Algorithms practice (implementation steps)
Principle 1 Jar package
Jar packaging principle 2
Jar packaging principle 3