To enable the Hello World Tutorial to run on two machines, follow the steps as directed in the tutorial, with the following changes. This tutorial was written for the Java (tm) 2 Platform, Standard Edition (J2Se(tm)), version 1.3. In this example, the client, stubs, and skeletons are located on the client machine, and the server and name server are located on the server machine. This scenario can be changed to meet your needs and is provided simply as an introduction to one way this can be accomplished.
idlj -fall Hello.idl
javac *.java HelloApp/*.java
javac *.java
tnameserv -ORBInitialPort 1050&
To do this on Windows:
start tnameserv -ORBInitialPort 1050
Note that the name server will run on port 1050 if you enter the command as listed. If you want a different nameserverport, replace 1050 with the correct port number.
java HelloServer -ORBInitialPort 1050
If you used a different nameserverport, replace 1050 with the correct port number.
java HelloClient -ORBInitialHost namerserverhost -ORBInitialPort 1050
Note that nameserverhost is the host on which the IDL name server is running. In this case, it is the server machine.
If you used a different nameserverport, replace 1050 with the correct port number.