cancel
Showing results for 
Search instead for 
Did you mean: 

Import error in Code

Former Member
0 Kudos

Hi,

I am using the following code to do a JCO connection.

But I am getting an error saying this class lib is not found. The code is :

import com.sap.mw.jco.JCO

Where can I find the jar file for the above class?

For any assistance please.

Thanks.

Regards,

mike

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member194198
Active Participant
0 Kudos

Hi Mike,

The jar is located in the SAP Jco zip file you may have downloaded from SDN. (e.g. sapjco-ntintel-2.1.3.zip)

Just add the jar file into the project in Eclipse by following the path :

Right click on the project name in the "Navigator" window,

Choose "Properties"

Choose "Java Build Path"

Go to the "Libraries" tab

Click "Add External Jar"

Find the sapjco.jar and select it.

And bob should be your uncle.

Cheers

Rich

Former Member
0 Kudos

Hi,

the name of the .jar depends on the WebAS version you have. Generally, you can use the netweaverlibraries.zip download from the PDK, if you have one installed.

Specifically, if you have windows, you can search the WebAS directory for files ending with .jar and containing SIMPLECLASSNAME.class, in your case JCO.class.

Doing so with EP6 will yield you a <serverbasedir>\JC00\j2ee\cluster\server0\bin\ext\com.sap.mw.jco\jrfc.jar

Regards,

Armin