Skip to Content
0
Former Member
Sep 03, 2009 at 11:28 AM

"package JCO does not exist" error while creating connection with SAP

212 Views

Hi Experts,

I just have started with making a connection with SAP ABAP from JAVA.

I have downloaded the JCo Packed 3.0.2 version.

Also made the classpath and path settings.

While running the below code :

_______________________________________________

import com.sap.mw.jco.*;

public class JAbapConnect extends Object {

JCO.Client mConnection;

JCO.Repository mRepository;

public JAbapConnect() {

try {

mConnection =

JCO.createClient("000", // SAP client

"TEST", // userid

"TEST", // password

"EN", // language

"128.91.61.111", // host name

"00"); // system number

mConnection.connect();

}

catch (Exception ex) {

ex.printStackTrace();

System.exit(1);

}

}

public static void main (String args[]) {

JAbapConnect app = new JAbapConnect();

}

}

____________________________________________

it gives error like :

D:\Projects\CSA Time Table Mgnt\JAbapConnect.java:1: package com.sap.mw.jco does not exist

import com.sap.mw.jco.*;

^

D:\Projects\CSA Time Table Mgnt\JAbapConnect.java:9: package JCO does not exist

JCO.Client mConnection;

^

D:\Projects\CSA Time Table Mgnt\JAbapConnect.java:10: package JCO does not exist

JCO.Repository mRepository;

^

D:\Projects\CSA Time Table Mgnt\JAbapConnect.java:20: cannot find symbol

symbol : variable JCO

location: class JAbapConnect

JCO.createClient("000", // SAP client

^

4 errors

Process completed.

Pl. do the helpful.

Regards

Jimit.