Configuring Dependencies
Connect Using the JCo JAR File
The CData JDBC Driver for SAP ERP relies on the SAP RFC to execute queries and retrieve data from SAP. The RFC depends on the JCo (Java Connector) JAR file.To access the RFC SDK used to communicate with SAP, you can use the SAP JCo (Java Connector). You need to include the sapjco3.jar in your build path and ensure that the native library location for the JAR is set to the folder containing the sapjco3 library.
You must also ensure that the bitness (32-bit or 64-bit) of the libraries matches the bitness of the Java Virtual Machine (JVM) on which your application is running. A mismatch between these can lead to errors where the JVM cannot load the native library, resulting in a failure to establish a connection to the SAP system. Before downloading, check your system's architecture and download the corresponding version of the library.
- On Linux, place the libsapjco3.so file in the same directory as the sapjco3.jar.
- On Mac OS X, place the libsapjco3.jnilib file in the same directory as the sapjco3.jar.
Follow these steps to download the relevant jar file:
- Open the SAP Java Connector.
- Select the Jco version that matches your platform.
- Click the download link. This opens the login page.
- Login to the SAP site with a valid S-User ID.
- Download the package.