Skip to Content
author's profile photo
Former Member

Import error in Code

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Aug 05, 2004 at 08:42 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Aug 05, 2004 at 10:05 AM

    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

    Add comment
    10|10000 characters needed characters exceeded