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 JSON configuration file. 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 JSON configuration files that contains the Info*Engine and adapter properties.
For more information about this file, see the Windchill Installation and Configuration Guide.
7. Set the IENAMINGSERVICENAME variable.
This variable specifies the Windchill Info*Engine NamingService name in JSON configuration file.
8. Set the WEB_APP_HOME variable.
This variable specifies the location of the Windchill Info*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. Share the directory which contains the IEConf folder with read/write access which store the Info*Engine configuration files. Update com.infoengine.config.dir=<shared location> with shared location in the ie.properties file using the xconfmanager utility.
b. 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.
c. 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
d. The WEB_APP_HOME variable is now the directory location from which you ran the jar command.
WEB_APP_HOME =<IeAdapter.zip_extracted_location>
Was this helpful?