Building the client side HelloWorld application

$CICS_HOME/samples/dfjcorb/HelloWorld/client contains the CORBA client part of the application. The source of the Java™ client application is called HelloWorldClient.java. This application should run with any CORBA-compliant ORB.

The following steps are required to build the Java client application:
  1. Download the following files to the client workstation (in ASCII mode):
    • .../dfjcorb/HelloWorld/HelloWorld.idl
    • .../dfjcorb/HelloWorld/client/HelloWorldClient.java
  2. Compile the provided IDL with the client ORB's IDL-to-Java compiler to produce the Java client side stubs required by the sample application. These stubs will be created in a sub-directory called hello. Move the client application HelloWorldClient.java into this sub-directory.
  3. Compile the client application, ensuring that the Java classes produced in the previous step are available through the CLASSPATH environment variable. To compile the client application from the current directory, enter:
    javac hello\HelloWorldClient.java

    You will also need the CosLifeCycle and CosNaming runtime classes. If your client ORB environment does not provide these services ready built then you can use the omgcos.jar file shipped in the $CICS_HOME/lib directory on HFS. Alternatively you may choose to build these classes from the original OMG-supplied IDL. In this case a copy of the relevant IDL files is available in $CICS.HOME/samples/dfjcorb/.

    The process of turning pure IDL into executable code is ORB-dependent, but if you are using an ORB supplied with a JVM then it is likely that the following commands will work:
     idlj -pkgprefix CosNaming org.omg -pkgprefix CosLifeCycle org.omg -fall CosLifeCycle.idl
     idlj -pkgprefix CosNaming org.omg -pkgprefix CosLifeCycle org.omg -fall CosNaming.idl
     javac org\omg\CosLifeCycle\*.java 
                   org\omg\CosNaming\NamingContextPackage\*.java
                   org\omg\CosNaming\*.java 
    These classes must be in your classpath when you attempt to build any CICS stateless CORBA client application.