1

I used 64 bit JCO JAR and DLL files to call BAPI in Java but is giving some exception like:

Exception in thread "main" java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path [/home/dev/Desktop/CLSSnanobi/rahul/dlls] at com.sap.mw.jco.JCO.<clinit>(JCO.java:871)

I googled a lot but I can't find any solution.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
user2131001
  • 121
  • 1
  • 6

1 Answers1

0

The SAP Java Connector is not a pure Java solution - you need a platform-specific native library for it to work. As @RC said, you need to place that platform-specific library in a location that the JVM can find.

The library should be included with your JCo installation (libsapjco3.so for JCo 3.x), but if you don't have it you can obtain it by downloading the NetWeaver RFC SDK (amongst other things).

For more information:

  • 1077727 - SAP JCo 3.0 release and support strategy
  • Note 1025361 - Installation, Support and Availability of the SAP NetWeaver RFC Library
  • Note 1005832 - Overview on RFC Libraries and SDKs
mjturner
  • 1,035
  • 7
  • 16