IBM Support

How to clear the WebSphere class caches



Instructions on clearing the java class caches in IBM WebSphere Application Server. Both the JVM's shared class cache and WebSphere Application Server's OSGi class cache.

Resolving The Problem

IBM Support may ask you to clear the class cache. There are several reasons for this. After an upgrade, it is possible that the class cache's are still holding onto previous versions of classes. It is also possible that the caches became corrupted.

Please remember there are two caches that will need to be cleared, the JVM's cache and the OSGi cache. The server has to be stopped before clearing the cache.

To clear the OSGi class cache:

  • For UNIX platforms, run the following script in each profile:

    For Windows platforms, run the following script in each profile:


To clear the JVM's class cache (Linux, AIX, z/OS and Windows):

  • For UNIX and z/OS platforms, run the following script:

    For Windows platforms, run the following script:

    And clear the following directory contents:
    <WinUsers_home>\Local Settings\ApplicationData\javasharedresources\

    where WinUsers_home is either C:\Documents and Settings\DefaultUser OR C:\Users depending on your current version of Windows.

    Please note:

    1. You should not delete the cache while any of the JVM's are running and using the cache. The server has to be stopped before clearing the cache.

    2. You must be logged in as the user who started WebSphere Application Server.

    3. For Windows the clearClassCache.bat may not work if you are using Windows Services. Please follow these steps:

    Clear the following directory contents:

    For Windows XP/Windows 2003:

    C:\Documents and Settings\DefaultUser\Local Settings\ ApplicationData\javasharedresources\

    For Window Vista/Windows 7/Windows 2008:


       For Windows 2008/Windows 2012/Windows 2016:





[{"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Java SDK","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"9.0;8.5;8.0;7.0","Edition":"Network Deployment","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
07 November 2018