I have the following test program that gives the message that can be
seen after the program.
I believe I have to do something with "Context".
What I have to do there I am not sure of.
I also specify all the JAR Files in the lib directory in the CLASSPATH
as well as the local directory.
----------------- pgm----------------
import com.ibm.ejs.sm.ejscp.wscpcommand.WscpCommand;
import com.ibm.ejs.sm.ejscp.wscpcommand.WscpResult;
public class eWSCPtest
{
public static void main(String args[])
{ try
{ WscpCommand wscpCommand = new
WscpCommand("localhost","900");
String cmd = "ApplicationServer list";
WscpResult results = wscpCommand.evalCommand(cmd);
if (!results.success())
{ System.out.println("command failed: " +
results.getErrorInfo());
}
}
catch (Exception e)
{ e.printStackTrace(System.out);
}
}
}
----------------------------------------
---------- error message----------------
Unable to read required resource: /com/ibm/websphere/product.xml
java.io.IOException: server.root system property not set
at
com.ibm.websphere.product.WASProduct.loadFromFile(WASProduct.java:264)
at
com.ibm.websphere.product.WASProduct.<clinit>(WASProduct.java:153)
at
com.ibm.ejs.sm.ejscp.ClientRepository.getSystemProperties(ClientRepository.java:817)
at
com.ibm.ejs.sm.ejscp.ClientRepository.<init>(ClientRepository.java:146)
at
com.ibm.ejs.sm.ejscp.EjscpExtension.init(EjscpExtension.java:126)
at tcl.lang.JavaLoadCmd.cmdProc(JavaLoadCmd.java:129)
at tcl.lang.AutoloadStub.cmdProc(Extension.java:144)
at tcl.lang.Parser.evalObjv(Parser.java(Compiled Code))