Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JCo 3.0.5 's configuration problem

used JCo 3.0.5 to get connection from java to sap.I write a client

program named MyConnect01.java. In the command cmd (Windows XP sp2 32bit),

javac MyConnect01.java, I got the file MyConnect01.class without any exception.

but when I use command java MyConnect01 to execute , there come the exception

like this:

java.lang.UnsatisfiedLinkError: E:\JCo\sapjco3-NTintel-3.0.5\sapjco3.dll:

由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(Unknown Source)

at java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.lang.Runtime.loadLibrary0(Unknown Source)

at java.lang.System.loadLibrary(Unknown Source)

at com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:441)

at com.sap.conn.jco.rt.DefaultJCoRuntime.registerNativeMethods(DefaultJCoRuntime.java:307)

at com.sap.conn.jco.rt.JCoRuntime.registerNatives(JCoRuntime.java:969)

at com.sap.conn.rfc.driver.CpicDriver.<clinit>(CpicDriver.java:955)

at com.sap.conn.rfc.engine.DefaultRfcRuntime.getVersion(DefaultRfcRuntime.java:43)

at com.sap.conn.rfc.api.RfcApi.RfcGetVersion(RfcApi.java:261)

at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:200)

at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:73)

at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.sap.conn.jco.JCo.createJCo(JCo.java:52)

at com.sap.conn.jco.JCo.<clinit>(JCo.java:26)

at com.sap.conn.jco.JCoDestinationManager.getDestination(JCoDestinationManager.java:61)

at MyConnect01.connectDirect(MyConnect01.java:50)

at MyConnect01.main(MyConnect01.java:224)

Exception in thread "main" java.lang.ExceptionInInitializerError: Error getting the version

of the native layer: java.lang.UnsatisfiedLinkError: E:\JCo\sapjco3-NTintel-3.0.5\sapjco3.dll:

由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题。

at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:212)

at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:73)

at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at com.sap.conn.jco.JCo.createJCo(JCo.java:52)

at com.sap.conn.jco.JCo.<clinit>(JCo.java:26)

at com.sap.conn.jco.JCoDestinationManager.getDestination(JCoDestinationManager.java:61)

at MyConnect01.connectDirect(MyConnect01.java:50)

at MyConnect01.main(MyConnect01.java:224)

The Chinese words there means like this .(Beacause of the Exception of the configuration of the

application, the application can not startup. Reinstallation may fit the problem)

what is the matter? how can i fit it ?

here is my configuration:

windows sp2 32bit

jdk 1.5, and i config the Path ,java_home,classpath parameters ,and i can run javac java commands

in cmd,that means jdk right.

sapjco3-NTintel-3.0.5. I download it from service.sap.com/connectors, I unzip if to E:\JCo\sapjco3-

NTintel-3.0.5 dir.under the folder there are :sapjco3.dll,sapjco3.jar,Readme.txt files and javadoc,

examples subfolders. then I config it as the html:E:\JCo\sapjco3-NTintel-3.0.5\javadoc\installation.html.

To install JCo for Windows unzip the appropriate distribution package into an arbitrary directory

{sapjco3-install-path}.

Then add {sapjco3-install-path} to the PATH environment variable.

Finally, add {sapjco3-install-path}\sapjco3.jar to your CLASSPATH environment variable.

E:\JCo\sapjco3-NTintel-3.0.5 in the Path

E:\JCo\sapjco3-NTintel-3.0.5\sapjco3.jar in the CLASSPATH.

help me !

thank you ,guys

Edited by: yang lei on Apr 14, 2010 5:48 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question