Configure class preloading

Class preloading affects how quickly a WebSphere Application Server process starts.

 

Overview

The first time that a WAS process starts up, the name of each class that is loaded and the name of the JAR file that contains the class are written to a preload file. Subsequent startups of the process use the preload file to start the process more quickly.

No configuring of class preloading is necessary.

However, an administrator can disable or enable preloading explicitly. By default, class preloading is enabled for WebSphere Application Server processes. To change the configuration for class preloading, an administrator sets new values for system properties.

 

Steps for this task (dependent on configuration)

  • Disable class preloading. Set the Java virtual machine (JVM) system property ibm.websphere.preload.classes to false.

    1. In the administrative console, click Servers > Application Servers > servername > Java and Process Management > Process Definition > Java Virtual Machine to access the Java Virtual Machine page.

    2. On the Java Virtual Machine page, specify -Dibm.websphere.preload.classes=false for Generic JVM arguments.

    3. Click OK.

    4. Save your administrative configuration.

    5. Stop the application server and then restart the application server.

  • Enable class preloading again. If you disabled class preloading, one can enable it again by doing either of the following:

    • Set the JVM system property to true. On the Java Virtual Machine page, specify -Dibm.websphere.preload.classes=true for Generic JVM arguments.

    • Remove the JVM system property that was created to disable class preloading. On the Java Virtual Machine page, remove the value -Dibm.websphere.preload.classes=false specified for Generic JVM arguments.

    After you change the JVM system property, click OK, save your administrative configuration, stop the application server, and then restart the application server.

  • Regenerate a class preload file. Delete the .preload file for the WAS process. When the process next starts up, a new class preload file is generated for the process.


 

See Also


Class loaders

 

Related Tasks


Class loading