Also, the AS400ToolboxJarMaker class can unzip a JAR file for you to gain access to the individual content files for basic use.
According to your needs, you can invoke the AS400ToolboxJarMaker methods from within your own Java program or from a command line. Call AS400ToolboxJarMaker from the command line by using the following syntax:
java utilities.JarMaker [options]
where
For a complete set of options available to run at a command line prompt, see the following:
For example, with the following code, you are extracting AS400.class and all of its dependent classes from jt400.jar:
java utilities.AS400ToolboxJarMaker -source jt400.jar -extract outputDir -requiredFile com/ibm/as400/access/AS400.class
Suppose you wanted to split up a large JAR file into smaller JAR files, according to your preference for maximum JAR file size. AS400ToolboxJarMaker, accordingly, provides you with the split(jarFile, splitSize) function.
In the following code, jt400.jar is split into a set of smaller JAR files, none larger than 300K:
java utilities.AS400ToolboxJarMaker -split 300
For example, the following command creates a JAR file that contains only those IBM Toolbox for Java classes needed to make the CommandCall and ProgramCall components of the IBM Toolbox for Java work:
java utilities.AS400ToolboxJarMaker -component CommandCall,ProgramCall
Additionally, if it is unnecessary to convert text strings between Unicode and the double byte character set (DBCS) conversion tables, you can create a 400K byte smaller JAR file by omitting the unneeded conversion tables with the -ccsid option:
java utilities.AS400ToolboxJarMaker -component CommandCall,ProgramCall -ccsid 61952
Note: Conversion classes are not included with the program call classes. When including program call classes, you must also explicitly include the conversion classes used by your program by using the -ccsid option.