cancel
Showing results for 
Search instead for 
Did you mean: 

Java Application as jar File cannot connect to SAP via JCO

Former Member
0 Kudos

Hey guys,

I wrote a test class to play a little with the java connector. Everything worked fine.

Now I want to pack my java class and the JCO classes in one jar file. I have written a manifest file with the Main-Class statement and after I start the jar file I got following exception:

Exception in thread "main" java.lang.ExceptionInInitializerError: JCO.classIniti

alize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjco

rfc in java.library.path]. java.library.path [C:\WINDOWS\system32;.;C:\WINDOWS\S

ystem32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Ja

vaConnector\sapjco.jar;C:\j2sdk1.4.2_12\bin;]

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

at de.lymez.sti.SAPAufruf.getDocnr(SAPAufruf.java:26)

at de.lymez.sti.Aufruf.main(Aufruf.java:12)

Can anyone help me? I don't think that I forget something during the JCO installation, because my class file worked fine and give me the correct values out of the SAP System.

Best regards,

Timo

Accepted Solutions (0)

Answers (1)

Answers (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Timo,

Please check and especially the post titled "WELL OUTLINED TUTORIAL HOW TO INSTALL AND CONFIGURE JCO ON WIN 2000 & XP".

Best regards,

Vladimir

Former Member
0 Kudos

Thanks Vladimir,

but I followed the Tutorial and copied every dll in the wright folder and set the pathes. In one of the threads someone told about a tool named dependency walker. I used this with the sapjcorfc.dll and the tool answered that the DRVADODB.DLL is not found. Can anyone send me this dll? And why worked everything fine, when I use the class? I only have problems when I use one jar file!

Thanks for any help!!

Regards,

Timo