Enable Java 2 security prior to J2EE application client run time initialization
To enable the Java 2 security prior to the 2EE application client run time initialization, set the...com.ibm.websphere.client.applicationclient.archivedir... system property by performing the following steps...
- Set the system property to the directory where the EAR file is expanded...-Dcom.ibm.websphere.client.applicationclient.archivedir=/usr/mrear1
- Set the java.security.policy system property to use the $WAS_HOME/properties/client.policy file, for example-Djava.security.policy=$WAS_HOME/properties/client.policy
- Setting the com.ibm.websphere.client.applicationclient.archivedir property has the following effects...
- If the directory does not exist or if it is empty, the EAR file is extracted to that directory.
- The EAR file is reused if it was previously extracted. This reuse occurs even if the EAR file specified on the command line is different.
- The security manager grants the permissions from the client.policy file to that directory and all its subdirectories.
- There are two types of EAR files. The first type of EAR file is a single file that contains all the enterprise application files. The second type is a set of directories and subdirectories. The following items only apply if you are using the single file form...
- To update your EAR file, delete the directory first.
- The new EAR file is extracted to the directory the next time you run. If you do not delete the directory or change the system property value to point to a different temporary directory, the currently extracted EAR file is reused, and your changed EAR file is not used.
- When specifying the com.ibm.websphere.client.applicationclient.archivedir property, verify that the directory you specify is unique for each EAR file that you use. For example, do not point MyEar1.ear and MyEar2.ear files to the same directory. You must also create all directories up to, but not including, the last directory. For example, if you set the following property...then usr and myears must exist, but myear1 need not exist prior to running the launchClient class.com.ibm.websphere.client.applicationclient.archivedir=/usr/myears/myear1