Building and running the Java apps

Compiling the Java source code for our Hello World example is pretty straightforward. First, save these files to a directory local to a machine on which you have access to version 1.2 of the Java Development Kit (JDK) and the idltojava compiler: Compile the IDL file:
	$ idltojava Hello.idl 
Then compile all the Java source files:
	$ javac *.java 
You may get a couple of "deprecated" warnings, but since it's in regard to the IDL-generated code, there's not a lot you can do about it.

You can run the examples similarly to the way you ran the C++ versions. They're semantically identical.

	$ java HelloServer > /tmp/ior &
	[1] 10400
	$ java HelloClient `cat /tmp/ior`
	World said "Greetings from Java World server!!"
	$ kill %1
	[1]+  Terminated              java HelloServer >/tmp/ior
	
Running the apps on NT is slightly more difficult, but I'm sure you'll figure it out.

Convince yourself that CORBA is independent of both platform and language by mixing Java clients with C++ servers on Unix and/or NT and vice versa.

Have fun.

Back to... [ Corba Tutorials ]


Jim Crossley
Last modified: Fri Mar 26 20:38:25 EST 1999