+

Search Tips   |   Advanced Search

Specifying the directory for an expanded EAR file


We can archive the Manifest.mf client JAR files instead of automatically cleaning them up after the application exits.

Each time the launchClient tool is called, it extracts the 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 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...

 

  1. Specify a directory to extract the EAR file by setting the com.ibm.websphere.client.applicationclient.archivedir Java 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.

  2. Delete the directory before running the launchClient tool again, to update the EAR file. When you call the launchClient command, it extracts the new EAR file to the directory. If we 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 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 the MyEar1.ear and the MyEar2.ear files to the same directory.

 

Related tasks


Running a Java EE client application with launchClient

 

Related


launchClient tool