Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sapjco.jar problem

Former Member
0 Likes
624

Hi

iam writing a pgm to interact sap and java, for this purpose i have placed sapjaco.jar in my classpath

but when iam compling it does not shows any error , when i am running the program iam getting this error. pls any one help me. why iam getting this error.

C:\>javac MaterialList.java

C:\>java MaterialList

This class looks up materials.

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

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

no sapjcorfc in java.library.path

at com.sap.mw.jco.JCO.<clinit>(Unknown Source)

at MaterialList.main(MaterialList.java:24)

Hi

iam writing a pgm to interact sap and java, for this purpose i have placed sapjaco.jar in my classpath

but when iam compling it does not shows any error , when i am running the program iam getting this error. pls any one help me. why iam getting this error.

C:\>javac MaterialList.java

C:\>java MaterialList

This class looks up materials.

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

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

no sapjcorfc in java.library.path

at com.sap.mw.jco.JCO.<clinit>(Unknown Source)

at MaterialList.main(MaterialList.java:24)

3 REPLIES 3
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
549

Hi,

I think you need to copy and paste your librfc32.dll file in the same path were you have the jar file.

Please do not move or cut this file from its location.

Regards,

Sesh

Read only

Former Member
0 Likes
549

Hi,

Check you have DLL librfc32.dll which comes with JCo download in C:\WINDOWS\system32

Check also that sapjcorfc.dll and sapjco.jar are in the same directory. Add this directory to your PATH environment variable.

Add a reference to sapjco.jar in your CLASSPATH environment variable.

Best regards,

Jorge Linares

Read only

Former Member
0 Likes
549

i got the output

Thanks