Java Reference
In-Depth Information
objectRef = namingContext.resolve(path);
Hello helloRef = HelloHelper.narrow(objectRef);
String greeting = helloRef.getGreeting();
System.out.println("Message received: "
+ greeting);
}
catch (Exception ex)
{
System.out.println("*** Client error! ***");
ex.printStackTrace();
}
}
}
7. Compile the client.
From the directory above directory
SimpleCORBAExample
, execute the following
command:
javac HelloClient.java
8. Run the application.
This requires three steps…
(i)
Start the CORBA naming service
.
This is achieved via the following command:
tnameserv
Example output is shown in Fig.
6.3
below.
Fig. 6.3
Starting the CORBA naming service under Java IDL
Search WWH ::
Custom Search