
The Process Integration runtime uses the runtime environment for Java mappings to execute Java mapping programs. In addition to the mapping API you can use other standard libraries of the SAP JEE server in loaded Java mapping programs.
You are using the SAP NetWeaver Developer Studio.
To be able to write a mapping program in your Java development environment, the Java runtime environment (JRE) of the SAP JEE server must be consistent with the JRE version of your Java development environment.
The mapping runtime environment consists of the following runtime components:
The Java runtime environment (JRE) of the SAP JEE server
The mapping API (see: Java Mapping )
sapxmltoolkit The http://help.sap.com/saphelp_nw70/helpdata/en/36/ef353e39011a38e10000000a114084/frameset.htm contains a JAXP implementation.
The SAP XML Toolkit will be replaced by version 5 of the Java Development Kit (JDK). More information: XSLT Mapping .
com.sap.mw.jco The SAP Java Connector enables ABAP-APIs to be called from the Java mapping. See the corresponding Javadoc documentation in the SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required).
com.sap.tc.Logging The SAP Logging Service enables integration with the Application Server Management tools. See the corresponding Javadoc documentation in the SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required).
Java programs that are loaded in an imported archive can use classes from the JRE, the mapping API, and these three standard libraries.
If you use JRE classes in your Java mapping programs then the same program restrictions apply as for Enterprise Java Beans (EJBs). This includes the following, for example (for a detailed description, see the relevant EJB specification):
Do not load a JDBC driver to use them directly. Instead, use the mapping lookup API (see: Mapping Lookups ), or the JDBC Connector Service in the SAP JEE Engine.
Do not use the package java.io to write directly to files, or use it to read directly from files.
Do not use a class loader in your classes.
Within a Java mapping program, do not call java.lang.System.exit() or java.lang.System.setProperties() .
Do not create or use any threads.
Do not use any network sockets.
Also ensure that you read the implementation considerations and restrictions in Java Mapping .
Search Path for Classes in Java Mapping Programs (Integration Server)
The mapping runtime environment is determined by the software component version and the namespace of the Java mapping to be executed. The environment also has a specific search sequence when loading the classes. If the mapping runtime environment finds a class in a path, the search is terminated and the subsequent paths are ignored. The paths are searched in the following sequence:
The paths of the JRE of the J2EE server
The path in which the mapping API is saved and the path of the standard libraries (SAP XML Toolkit, SAP Java Connector, SAP Logging Service), see above
Imported archives in the same namespace and the same software component version as the Java mapping to be executed
Imported archives in the same namespace and a subordinate software component version
Imported archives in other namespaces of the software component version
Imported archives in other namespaces of subordinate software component versions
Note that you can only load a class from the other namespaces if it is unique there.
Accessing the Runtime Environment in the SAP NetWeaver Developer Studio
Mapping API
To access the mapping API in a Java project in SAP NetWeaver Developer Studio, proceed as follows:
Choose Properties in the context menu for the Java project in which you want to apply the mapping API.
In the navigation tree choose Java Build Path and then choose the Libraries tab page.
Choose Add Variable.
From the list of classpath variables, select SAP_SYSTEM_ADD_LIBS and choose Extend .
Enhance the variable with the following path:
For more information about the mapping API (and the lookup API it contains) refer to SAP Developer Network at https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required) and SAP NetWeaver Developer Studio:
.
Java EE Standard Libraries
To include the three J2EE standard libraries in the class path of SAP NetWeaver Developer Studio, proceed as follows:
Call the context menu for your Eclipse project and choose Properties .
Choose Java Build Path on the left-hand side.
Choose the Libraries tab page on the right-hand side.
Choose Add Variable.
Select SAP_SYSTEM_ADD_LIBS and choose Extend .
Select the required Jar file by using the following directory paths:
sapxmltoolkit
comp/ENGINEAPI/DCs/sap.com/sapxmltoolkit/_comp/gen/default/public/default/lib/java/
com.sap.mw.jco
comp/ENGINEAPI/DCs/sap.com/com.sap.mw.jco/_comp/gen/default/public/default/lib/java/
com.sap.tc.Logging
comp/ENGINEAPI/DCs/com.sap.tc.Logging/_comp/gen/default/public/default/lib/java/