客户切换服务器,在正式环境下,调用sap运行正常。切换新服务器后,报
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 [C:\Program Files (x86)\Java\jdk1.6.0_171\bin\sapjcorfc.dll: Can't find dependent libraries]. java.library.path [C:\Program Files (x86)\Java\jdk1.6.0_171\bin]
从报错来看,找不到依赖库,现在在 C:\Program Files (x86)\Java\jdk1.6.0_171\bin\sapjcorfc.dll 这个路径下,是有 sapjcorfc.dll 文件的。
我尝试删掉这个文件,则报:
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 [C:\Program Files (x86)\Java\jdk1.6.0_171\bin]
所以这个文件应该是必须要有的,system32下已经放置了 sapjcorfc.dll librfc32.dll。
那上面这个 Could not initialize dynamic link library sapjcorfc [C:\Program Files (x86)\Java\jdk1.6.0_171\bin\sapjcorfc.dll: Can't find dependent libraries] 求各位给个思路。