Hello
I'm a newbie and I'm trying to connect to SAP with this simple application I took from SAP help but I got an error message. Below is the code. At the bottom is the error message I get. It seems like the public Connect1 is not a type or must be decleared first.I tried doing that but the problem still persist.Could any body show me how to get ride of this problem? Thank you all.
import com.sap.mw.jco.*;
public class JcoTest {
JCO.Client mConnection;
public Connect1() {
try{
mConnection = JCO.createClient("300",//SAP Cleint
"<Test>",//userid
"test2",//password
"EN",//language
"<sap6>",//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();
}
}
ERROR MESSAGE STARTS HERE:
java.lang.Error: Unresolved compilation problems:
Connect1 cannot be resolved or is not a type
Connect1 cannot be resolved or is not a type
at JcoTest.main(JcoTest.java:40)
Exception in thread "main"