如何安装SAP JCo3

如何安装SAP JCo3,第1张

知道如何选择JCO之后, 安装的过程并不难,只要设好相应的环境变量就好了。下面以Windows 32bit环境为例,同时也会穿插一些Linux的内容。

1. 复制sapjco3.dll到c:/windows/system32/目录,或者, 复制sapjco3.dll到目录D:/Resources/Libraries/SAPJCo/JCO_304,

然后加入目录D:/Resources/Libraries/SAPJCo/JCO_304到环境变另PATH中(至于如何修改环境变量PATH,这里不再叙述)。

注:

在Linux和Solaris环境下,复制sapjco3.so到任何一个目录中去,例如:/usr/local/jco3, 然后修改/etc/profile文件,把目录/usr/local/jco3加入到环境变量LD_LIBRARY_PATH中。

2. 加入windows需要的DLL, 复制 msvcr80.dll 和 msvcp80.dll 文件到目录 C:/windows/system32/

3. 恭喜你,你已经安装好了JCO, 就这么简单

谢谢shaw1236的关注。 现在问题已经解决,到SAP的开发网站搜索了一下,因为当前使用的JCO版本要求与SAP连接的参数 使用大写形式,由于登录系统X的参数无英文字符,故能正常登录,而登录系统Y时,因为参数中 包含字符,却使用了小写的缘故所以不能登录。

jco连接SAP时,请务必将文件:sapjcorfc.dll,librfc32放到C:\WINDOWS\system32\下边。

否则报错如下:

xception 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 [C:\WINDOWS\system32\sapjcorfc.dll: Can't find dependent libraries]. java.library.path [E:\eplat\JDK1.6\bin.C:\WINDOWS\Sun\Java\binC:\WINDOWS\system32C:\WINDOWSE:\eplat\JDK1.6\jre\binD:/Program Files/Java/jdk1.6.0_12/bin/../jre/bin/clientD:/Program Files/Java/jdk1.6.0_12/bin/../jre/binD:/Program Files/Java/jdk1.6.0_12/bin/../jre/lib/i386D:\oracle\product\10.2.0\db_1\binD:\OraHome_1\binC:\WINDOWS\system32C:\WINDOWSC:\WINDOWS\System32\WbemC:\Program Files\Microsoft SQL Server\80\Tools\BINND:\Program Files\SecureCRT\D:\Program Files\Tcent\QQPCMgr\6.8.2385.401.D:\Program Files\Java\jdk1.6.0_12\binD:\Program Files\Java\jdk1.6.0_12\jre\binD:\Program Files\Tcent\QQPCMgr\6.8.2385.401]

at com.sap.mw.jco.JCO.<clinit>(JCO.java:776)

at com.magicoo.sale.sap.SAPConnect.getSAPPoolConnection(SAPConnect.java:13)

at com.magicoo.sale.service.YdmerchanlayerjkService.findFromSap(YdmerchanlayerjkService.java:21)

at com.magicoo.sale.service.YdmerchanlayerjkService$$FastClassByCGLIB$$f845a752.invoke(<generated>)

at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)

at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:696)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:631)

at com.magicoo.sale.service.YdmerchanlayerjkService$$EnhancerByCGLIB$$5d826ddb.findFromSap(<generated>)

at com.magicoo.sale.Test.main(Test.java:20)


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/7932497.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-11
下一篇2023-04-11

发表评论

登录后才能评论

评论列表(0条)

    保存