public class AS400ClassPathOptimizer
extends java.lang.Object
public static void main(String args[]) throws Exception { String classpath = "/home/toronto/DEV/:/home/toronto/DEV/server.jar:" + "/home/toronto/DEV/preprocessor.jar:/qibm/ProdData/HTTP/Public/jt400/lib/jt400.jar:" + "/qibm/proddata/java400/jt400ntv.jar:/home/toronto/DEV/collections.jar:" + "/home/toronto/DEV/antlr.jar:/home/toronto/DEV/crimson.jar:/home/toronto/DEV/xalan.jar:" + "/home/toronto/DEV/jaxp.jar:"; AS400 as400 = new AS400( "mysystem", "user", "password" ); AS400ClassPathOptimizer cpo = new AS400ClassPathOptimizer( as400, classpath ); cpo.setOptimizationLevel( cpo.LEVEL_40 ); cpo.setLicensedInternalCodeOptions( cpo.LICOPT_NOPRERESOLVEEXTREF ); // submit the optimizations and exit since this could take some time cpo.setOptimizeInParallel( true ); // so we can see the details of what it is doing... cpo.setOutputLog( System.out ); // submit the optimizations cpo.optimize(); System.exit( 0 ); }
Modifier and Type | Field and Description |
---|---|
static int |
LEVEL_10 |
static int |
LEVEL_20 |
static int |
LEVEL_30 |
static int |
LEVEL_40 |
static java.lang.String |
LICOPT_NOPRERESOLVEEXTREF |
static int |
NO_OPTIMIZATION |
Constructor and Description |
---|
AS400ClassPathOptimizer() |
AS400ClassPathOptimizer(AS400 as400) |
AS400ClassPathOptimizer(AS400 as400,
java.lang.String classpath) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLicensedInternalCodeOptions() |
boolean |
isOptimizeInParallel() |
boolean |
isWaitForOptimizations() |
void |
optimize() |
void |
run() |
void |
setAS400(AS400 as400) |
void |
setClasspath(java.lang.String classpath)
set the AS400 classpath to opimize.
|
void |
setLicensedInternalCodeOptions(java.lang.String s)
Sets the value to use on the CRTJVAPGM LICOPT parameter
|
void |
setOptimizationLevel(int level)
Set the level to optimize classes to.
|
void |
setOptimizeDirectories(boolean b) |
void |
setOptimizeInParallel(boolean s)
if true run each CRTJVAPGM in a separate job.
|
void |
setOutputLog(java.io.PrintStream out) |
void |
setWaitForOptimizations(boolean s)
if true the optimize() method will wait for all CRTJVAPGM commands to end
before it returns.
|
public static final int NO_OPTIMIZATION
public static final int LEVEL_10
public static final int LEVEL_20
public static final int LEVEL_30
public static final int LEVEL_40
public static final java.lang.String LICOPT_NOPRERESOLVEEXTREF
public AS400ClassPathOptimizer()
public AS400ClassPathOptimizer(AS400 as400)
public AS400ClassPathOptimizer(AS400 as400, java.lang.String classpath)
public void setClasspath(java.lang.String classpath)
public void setAS400(AS400 as400)
public void setWaitForOptimizations(boolean s)
public boolean isWaitForOptimizations()
public void setOptimizeInParallel(boolean s)
public void setOptimizeDirectories(boolean b)
public boolean isOptimizeInParallel()
public java.lang.String getLicensedInternalCodeOptions()
public void setLicensedInternalCodeOptions(java.lang.String s)
public void setOptimizationLevel(int level)
public void setOutputLog(java.io.PrintStream out)
public void optimize() throws java.lang.Exception
java.lang.Exception
public void run() throws java.lang.Exception
java.lang.Exception