Precompiling all classes and methods in an application

This procedure precompiles all the classes in an application. The optimized jar files have all methods compiled.

About this task

For the purposes of this example, the application resides under the directory specified by the environment variable $APP_HOME and the jar files are in the subdirectory $APP_HOME/lib. The application also uses some classes from those provided by IBM® in rt.jar. In this case, you can precompile only the application code, namely main.jar and util.jar.

By default, the shared class cache is in /tmp/javasharedresources. Use the -cacheDir option to put the cache into a different directory. You cannot create a cache on a networked file system.

Procedure
  1. From a shell prompt, enter: cd $APP_HOME

    where $APP_HOME is the directory of your application.

  2. From a shell prompt, enter: cd $APP_HOME/lib. $APP_HOME/lib is the directory where main.jar and util.jar are stored.

What to do next



© Copyright IBM Corporation 2005, 2010. All Rights Reserved.
© Copyright Sun Microsystems, Inc. 1997, 2007, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This information center is powered by Eclipse technology. (http://www.eclipse.org/)