1/
Should we use main method in JCO.. Connections does not seem to be simple java programes... so why should we use them??? just for the sake of running the programme?
2/ And the below mentiond programme.. there is nothing called Connect1. Still the that class is created ..
do not you thik it has to be <b>TutorialConnect1</b> object and constructor,
import com.sap.mw.jco.*;
public class TutorialConnect1 extends Object {
JCO.Client mConnection;
public Connect1() {
try {
// Change the logon information to your own system/user
mConnection =
JCO.createClient("001", // SAP client
"<userid>", // userid
"****", // password
null, // language
"<hostname>", // application server 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();
}
}