Skip to Content

SAP JCO Develop: Unable to import com.sap.mw.jco.*

Hi all

I am new to SAP JCO and Netweaver Environment.

I am running the follwoing SAP JCO program..

***************************************************

package mySapJco;

import com.sap.mw.jco.*;

public class TutorialConnect1 extends Object {

JCO.Client mConnection;

public Connect1() {

try {

// Change the Logon Information

mConnection =

JCO.createClient("100", // SAP Client

"*******", // userid

"********", // password

null, // language

"", // host name

"00"); // System Number

mConnection.connect();

System.out.println(mConnection.getattributes());

mConnection.disconnect();

}

catch (Exception ex) {

ex.printStackTrace();

System.exit(1);

}

}

public static void main (String args[]) {

Connect1 app = new Connect1();

}

}

**********************************************

<b>The import stmt import com.sap.mw.jco.*; is getting failed.</b>

I have built this program on a Netweaver Dev Studio on <b>Simple JAVA Project --> Create Package.</b>

Help please !!!!!

Thanks

Kay

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 14, 2005 at 12:14 PM

    Did you include the classpath with your project?

    Regards,

    Benny

    Add comment
    10|10000 characters needed characters exceeded

    • Benny

      Thanks for the reply ....

      Forgot to include the Classpath. Thats was the reason!!!!

      Now it is working !!!

      Hope u know i am new to Net Studio...

      I donot know how to run this sample JCO application...

      Coupld you please guide me in running / debugging the application ????

      Many thanks

      Kay