Specify the directory for an expanded EAR file

Each time the launchClient script is called, it extracts the EAR file to a random directory name in the temporary directory on your hard drive. It then sets up the ClassLoader thread to use the extracted EAR file directory and JAR files included in the Manifest.mf client JAR file. In a normal J2EE Java client, these files are automatically cleaned up after the application exits. This cleanup occurs when the client container shutdown hook is called. To avoid extracting the EAR file (and removing the temporary directory) each time launchClient is called, complete the following steps:

  1. Specify a directory to extract the EAR file by setting the com.ibm.websphere.client.applicationclient.archivedir Java system property.

    Note:You must specify the -CCD option of the launchClient script to use this system property. See The launchClient script for more information.

    If the directory does not exist or is empty, the EAR file is extracted normally. If the EAR file was previously extracted, the launchClient script reuses the directory.

  2. Delete the directory before running the launchClient script again, if you need to update your EAR file. When you call the launchClient script, it extracts the new EAR file to the directory. If you do not delete the directory or change the system property value to point to a different directory, the launchClient script reuses the currently extracted EAR file, and does not use your changed EAR file.

    Note: When specifying the com.ibm.websphere.client.applicationclient.archivedir property, make sure that the directory you specify is unique for each EAR file you use. For example, do not point MyEar1.ear and MyEar2.ear files to the same directory.