Generate stubs and skeletons  Create the client program

Chapter 2: Creating CORBA Java Components and Clients

Write the server-side code

At this point, EAServer Manager has created server-side implementation files in the following directory under your EAServer installation:

java/classes/Sample/Intro/JavaArithmetic

The implementation template file is JavaArithemeticImpl.Java.new and the skeleton is called _sk_Tutorial_JavaArithmetic.java.

StepsCompleting the component implementation

  1. Rename JavaArithemeticImpl.Java.new to JavaArithmeticImpl.Java (that is, delete the .new extension). Open the renamed file in a text editor, then find the definition of the multiply method. Change the definition so that it matches the one below:

        double multiply
            (double m1, 
            double m2)
         {
              return m1 * m2;
         }
    
  2. Save your changes.

  3. Compile the component skeleton and implementation files using a JDK 1.3 or later compiler—for example, if you are using Windows:

    cd %JAGUAR%\java\classes\Sample\Intro\JavaArithmetic
    %JAGUAR%\bin\jc.bat *.java
    

    Or, if you are using UNIX:

    cd $JAGUAR/java/classes/Sample/Intro/JavaArithmetic
    $JAGUAR/bin/jc *.java
    




Copyright © 2005. Sybase Inc. All rights reserved. Create the client program

View this book as PDF