cancel
Showing results for 
Search instead for 
Did you mean: 

Running jar with sapjco

Former Member
0 Kudos

Hi

I have written a java program to uses sapjco.jar

to get access into R3.

If I run it in NWDS it works fine.

But if I try to run in from the command line:

java - cp c:\sapjco.jar - jar myProj.jar

I get NoClassDefFoundError : com/sap/mw/jco/JCO$Record.

What is the correct way to add sapjco as reference to a project running

from the command line?

regards

yuval

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

What I did was to put sapjco.jar in the following folder:

c:\Program files\java\jre6\lib\ext

Only then was I able to run my java program from

a FM by specifying

c:\Program files\java\jre6\bin\java.exe  -jar  path_to_my_jar\my_program.jar

I hope this will help others.

regards
yuval

Answers (2)

Answers (2)

junwu
Active Contributor
0 Kudos

maybe you should also put the dll in the cp

Former Member
0 Kudos

You need to add the required libs on the CLASSPATH. See the NWDS project properties to see what libs are included.