on 03-26-2009 8:27 AM
hi,
iam writing a program for iteracting sap and java system.
i write a pgm in java to interact sap , in notepad, when i am trying to execute the program it is showing this error.
C:\>javac firstEx.java
error: cannot read: firstEx.java
1 error
This is my program. pls any one help me.
import com.sap.mw.jco.*;
public class firstEx {
static myFirstServer serverConnections[] = new myFirstServer[3];
public static void startServers() {
JCO.addClientPool("POOL", 3, "800", "sridevi" ,"rvst2009" , "EN",
"5.137.151.198" ,"00");
IRepository repository = JCO.createRepository("REP", "POOL");
for(int i = 0; i < serverConnections.length; i++) {
serverConnections = new myFirstServer
("5.137.151.198", //gateway host, often the same as host
"sapgw00", //gateway service, generally sapgw+<SYSNR>
"JCOSERVER01", // corresponds to program ID defined in SM59
repository);
serverConnections.start();
};
}
public static void stopServers() {
for(int i = 0; i < serverConnections.length; i++)
{
serverConnections.stop();
};
}
public static void main(String[] args) {
startServers() ;
}
}
hi,
if u r using notepad the default will be saved with *.ext
if so do like this "firstEx.java" and save as u r common folder
and make sure that u added the classpath to the in evniroment variables so that java and javac will be excecuted
let me know u need any further info
bvr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
if so check the classpath
for example
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html
http://java.sun.com/docs/books/tutorial/essential/environment/paths.html
in the above link u have to write applications in bin folder
when u r writing in u r personal folder
http://mindprod.com/jgloss/classpath.html
let me know u need any further info
bvr
Hi,
Make sure that the "firstEx.java" exists in C:\
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.