Setting Up and Running JSDT
Software Requirements
-
JDK 1.1.x (or later) for your platform
-
Optional: A JavaTM enabled browser
-
JSDT classes (included in this release)
-
Example applets and applications (included in this release)
-
LRMP classes if you are going to use the LRMP implementation of JSDT.
See the JSDT
release notes
for more information
Hardware Requirements
-
JSDT works on all systems running the JDK 1.1.x. (or later)
Setting Up JSDT
-
Unzip the JSDT archive to extract all the files into a directory.
- Set your CLASSPATH properly. The procedure for doing this is going to
vary from system to system, but (assuming
$JSDTHOME
is the
directory where you installed JSDT), your CLASSPATH needs to include the
following two entries:
$JSDTHOME/lib/jsdt.jar
$JSDTHOME/examples/classes
Running the JSDT Registry
Before you can run any JSDT applications, you need to start a Registry
of the appropriate type. With this release, there are four JSDT types:
socket
- a TCP/IP sockets based implementation.
lrmp
- an LRMP (light-weight reliable multicast protocol)
implementation.
rmi
- an RMI (remote method invocation) implementation.
http
- an HTTP implementation.
The Registry can be started with:
java com.sun.media.jsdt.type.Registry -port 4561
where type is one of socket
, lrmp
,
rmi
or http
or you can call the com.sun.media.jsdt.RegistryFactory.startRegistry(type)
method.
Running the Examples
You can run the examples using appletviewer or a
JavaTM enabled browser. The setup instructions
below assume you are going to use the socket
implementation of
JSDT.
First one machine needs to run the servers for each of the examples.
For each of the commands below, we assume:
$SERVER is the machine where the servers will be running
To run the servers for the examples:
-
Start the Registry with:
java com.sun.media.jsdt.socket.Registry -port 4561
-
Start the Chat server with:
java examples.chat.ChatServer -server $SERVER -port 4461 -type socket
-
Start the Ppong Server with:
java examples.ppong.PpongServer -server $SERVER -port 4462 -type socket
-
To start the Sound server, change directories to
$JSDTHOME/examples
and run:
java examples.sound.SoundServer -server $SERVER -port 4463 -type socket
-
Start the Stock Server with:
java examples.stock.StockServer -server $SERVER -port 4464 -type socket
-
Start the Whiteboard server with:
java examples.whiteboard.WhiteBoardServer -server $SERVER -port 4466 -type socket
To run the examples with the applet viewer:
Before you run the examples, you need to configure them with the name of the
machine that is running their servers. In the $JSDTHOME/examples
directory, are four .html
files. Each file contains a
$SERVER
word that needs to be replaced with the name of the
server machine.
-
Change directories to the $JSDTHOME/examples directory.
-
Launch appletviewer with the name of the .html file that contains the example
you want to run.
Examples:
appletviewer Chat.html
appletviewer Ppong.html
appletviewer Sound.html
appletviewer Stock.html
appletviewer Whiteboard.html
To run the examples from a JavaTM enabled
browser:
-
Set your environment variables as described in Setting
Up JSDT.
-
Open this page from your browser and click on the links to the example applets.
To run the examples as applications:
These examples need the name of the machine that is running their servers.
For each of the commands below, we assume:
$SERVER is the machine where the servers will be running
-
To start the Chat user application, change directories to
$JSDTHOME/examples
and run:
java examples.chat.ChatUser -width 300 -height 250 -server $SERVER -port 4461 -type socket
-
To start the Ppong user application, change directories to
$JSDTHOME/examples
and run:
java examples.ppong.Ppong -width 600 -height 450 -server $SERVER -port 4462 -type socket
To start the Sound user application, change directories to
$JSDTHOME/examples
and run:
java examples.sound.SoundUser -width 400 -height 450 -server $SERVER -port 4463 -type socket
-
To start the Stock user application, change directories to
$JSDTHOME/examples
and run:
java examples.stock.StockUser -stocks SUNW+NSCP+IBM -server $SERVER -port 4464 -type socket
-
To start the Whiteboard user application, change directories to
$JSDTHOME/examples
and run:
java examples.whiteboard.WhiteBoardUser -width 600 -height 350 -server $SERVER -port 4466 -type socket
Copyright (c) 1996-99 Sun Microsystems, Inc.
All Rights Reserved