![]() The approach we present here is simple and straightforward. You can make the extractor program using various approaches. For more information about the manifest file, see the Jar File Specification. We've added a manifest file named jarmanifest to this tip's example code. The manifest file may contain a number of possible entries however, for our purposes here, we just need to specify the name of the Java class that contains the Java-based extractor program's main() method: Main-Class: ZipSelfExtractor To make executable JARs, you first need a manifest file called MANIFEST.MF in the META-INF directory. ![]() You just need a special JAR manifest file, a Java-based extraction program, the zip or jar file containing the base content files, and any Java SDK's jar utility application. ![]() Whereas the self-extracting zip can only create platform-specific executables, the self-extracting jar file can be distributed to and run on any platform supporting Java.Ĭreating the self-extracting jar file is straightforward. You can convert a base zip or jar file into an executable jar file on any Java platform. The executable runs the extractor program to extract the archived files into a user-specified output directory. Receivers of the exe file only need to run it to extract the original zip archive's contents. The utility tool combines a regular zip archive with an extractor program to generate a new executable (exe) file. Some zip utility tools can create self-extracting archives for various platforms, such as MS Windows. With the addition of the JAR manifest file, the Java runtime can easily locate and directly execute the main class of the Java application contained in the jar file. Sun has extended the zip format's use with various conventions so that you can pack Java classes into an archive file. ![]() Sun has adopted the zip format as the basis for the Java Archive (JAR). For many years, Phil Katz's archive creation, zip, has been one of the most popular file archiving formats. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |