|
Start Jini.
Edit the JiniExample3 SetInstallPoint script file.
Start the web server and the Jini service.
- Open a new command line and change to the server run directory:
\java \nuggets \pages \examples \JiniExample3 \server-side
(remove the spaces from the path). Run the web server program by
executing the r1 script file.
- Open a new command line and change to the same directory:
\java \nuggets \pages \examples \JiniExample3 \server-side
(remove the spaces from the path). Run the server program by
executing the r2 script file.
Start the client.
- Wait until the server is up (~15 seconds) then open a new
command line and change to the client run directory:
\java \nuggets \pages \examples \JiniExample3 \client-side
(remove the spaces from the path). Run the client program by executing
the r script file.
To run this example first start Jini:
- If the client and server are on separate machines: look to the notes for
starting client or server to find out how to start Jini for each machine.
Note: Jini's discovery process uses multicast IP packets which are not
normally enabled between machines on different networks or on different subnets.
For this reason, make sure both of your machines are on the same subnet.
- Otherwise, start Jini from the JiniExample1
directory using the r1.bat, r2.bat, and r3.bat files.
Then move the webserver files from this example to the webserver directory:
- Since each compile job deletes all the class files from the
Jini lib directory, always recompile the example using the c.bat
file (which performs the copy for you) before using the example.
Then start the server:
- If the client and server are on separate machines: copy the
\java\nugget and the \java\jini.100
trees over to the server machine retaining the directory names.
Then edit THIS_HOSTIP in the \java \nugget
\pages \examples \JiniExample3 \SetInstallPoint.bat file to
point to the IP address of the machine upon which the server
is running.
- Open a new command line and change to the server run directory:
\java \nuggets \pages \examples \JiniExample3 \server-side.
- If the client and server are on separate machines: start Jini
(http, rmid, and reggie) for this machine by executing r1.bat,
r2.bat, and r3.bat from this
server-side
directory.
- Run the server program by executing the
r.bat
script file.
Then start the client:
- If the client and server are on separate machines:
copy the
\java\nugget and the \java\jini.100
trees over to the client machine retaining the directory names. Then
edit THIS_HOSTIP in the \java \nuggets \pages
\examples \JiniExample3 \SetInstallPoint.bat file to point to
the IP address of the machine upon which the client is running.
(You do NOT need to start http, rmid, or reggie on the client machine.)
- Wait until the server is up (about 15 seconds) then open a new
command line and change to the client run directory:
\java \nuggets \pages \examples \JiniExample3 \client-side.
- Run the client program by executing the
r.bat
script file.
|