Example: Init Prototype 3

The following is a code example:

public class HelloWorld {

    public static void main(String[] args) {

Properties props = new Properties();

props.setProperty("ServerURL", "http://my-machine:18080");

        EMXMLInvoker.init(args, props);

        ...

    }

}

The following is a run example:

java HelloWorld

NOTE: This run example is used for illustrative purposes. To run it, you must add Java virtual machine (JVM) parameters and the Control‑M/EM API CLASSPATH. These concepts are discussed in Control-M/EM API Installation. This Thrift configuration is contained in the communication.xml file located in the emapi-918\ directory.

By using both values for props and args, you can supply values for props that can be overridden by values that are supplied for args.

Parent Topic

Init