Integration with Other Applications > Info*Engine Adapters > SAP Adapter Guide > SAP Adapter Configuration > Configuring an Out-of-Process SAP Adapter > Setting Classpath and Variables
  
Setting Classpath and Variables
* 
To use the JCo APIs on a Solaris machine running a 64-bit environment, you must explicitly provide "-d64" as a Java option in the startup script of the adapter.
Before running the adapter on a Linux machine, you should use the dos2unix command to ensure that the startup script is converted to Unix format. For example:
dos2unix<startup_script>
To configure the SAP adapter for the out-of-process mode, you must include the SAPAdapter.jar file in the classpath. You must also include the file sapjco.jar in the classpath to allow the adapter to invoke the JCo APIs.
You can set the classpath either as an environment variable or as part of the adapter startup script. For clarity and ease of maintenance, PTC strongly encourages configuring the classpath in your startup script.
1. Navigate to the following directory:
SAPAdapter_home/bin/
2. Open the following file in a text editor:
startAdapter
This file contains the configuration sections of the command file. The variables listed must be supplied in this file for proper operation of the SAP adapter. Refer to the comments in the startAdapter script for information regarding how to set the variables identified in the following steps.
3. Set the JAVA_HOME variable.
This variable is the home directory of your Java installation. For example:
JAVA_HOME=/usr/jdk1.5.0_06
4. Set the SAPADAPTER_HOME variable.
This variable specifies where the SAP adapter is installed. For example:
SAPADAPTER_HOME=/opt/myCompany/sap
5. Set the SERVICE_NAME variable.
This variable specifies the runtime service name of the SAP adapter in LDAP. For example:
SERVICE_NAME=sapAdapter
6. Set the IEPROPFILE variable.
This variable specifies the location of the ie.properties file, which is located in the <Windchill>/codebase/WEB-INF directory. This file contains a reference to the LDAP branch that contains the Info*Engine and adapter properties as well as LDAP validation information.
If you do not have access to this file, set the variable to an LDAP URL that provides the same information that is in the file. For example:
IEPROPFILE=ldap://myHost.myLocation.myCompany.com/dc=myHost,dc=myLocation,
dc=myCompany,dc=com,ou=Windchill,l=myLocation,o=myCompany
For more information about this file, see the Windchill Installation and Configuration Guide.
7. Set the IENAMINGSERVICENAME variable.
This variable specifies the WindchillInfo*EngineNamingService name in LDAP. For example:
IENAMINGSERVICENAME=com.myCompany.myLocation.myHost.NamingService
8. Set the WEB_APP_HOME variable.
This variable specifies the location of the WindchillInfo*Engine installation directory.
When configuring the SAP adapter out-of-process with Info*Engine on a different host, complete the following steps to copy the required files to the SAP adapter host and determine the value for WEB_APP_HOME variable:
a. Run the following command from the <Windchill>/bin/infoengine directory on the Info*Engine server:
ant -f PackageAdapter.xml package_files
This creates the <Windchill>/temp/ie_adapter_install/IeAdapter.zip file.
b. Copy the newly created IeAdapter.zip file to an arbitrary location on the adapter server (for example, copy it to the adapter installation directory) and run the following command from that location:
jar -xf IeAdapter.zip
c. The WEB_APP_HOME variable is now the directory location from which you ran the jar command.
WEB_APP_HOME =<IeAdapter.zip_extracted_location>
d. Use the instructions provided in the following topic to encrypt the LDAP administrator password that is stored on the host where the SAP adapter is installed.
* 
Password encryption should be performed only when installing the adapter out-of-process with Info*Engine on a different host.