Specifying the directory for an expanded EAR file
You can archive the Manifest.mf client Java™ Archive (JAR) files instead
of automatically cleaning them up after the application exits.
Before you begin
Each time the launchClient tool is called, it extracts the Enterprise Archive (EAR) file to a
random directory name in the temporary directory on your hard drive. Then the tool sets up the
thread ClassLoader to use the extracted EAR file directory and JAR files included in the
Manifest.mf client Java Archive (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 the launchClient tool is called, complete the following steps:
Procedure
- Specify a directory to extract the EAR file by setting the
com.ibm.websphere.client.applicationclient.archivedirJava system property. If the directory does not exist or is empty, the EAR file is extracted normally. If the EAR file was previously extracted, the launchClient tool reuses the directory. - Delete the directory before running the launchClient tool again, if you need to update
your EAR file. When you call the
launchClientcommand, 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 tool reuses the currently extracted EAR file and does not use your changed EAR file.When specifying thecom.ibm.websphere.client.applicationclient.archivedirproperty, make sure that the directory you specify is unique for each EAR file you use. For example, do not point theMyEar1.earand theMyEar2.earfiles to the same directory.