Setting Up and Running JSDT

Software Requirements

Hardware Requirements

Setting Up JSDT

  1. Unzip the JSDT archive to extract all the files into a directory.
  2. 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:
  3. $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:

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:

  1. Start the Registry with:
  2. java com.sun.media.jsdt.socket.Registry -port 4561
  3. Start the Chat server with:
  4. java examples.chat.ChatServer -server $SERVER -port 4461 -type socket
  5. Start the Ppong Server with:
  6. java examples.ppong.PpongServer -server $SERVER -port 4462 -type socket
  7. To start the Sound server, change directories to $JSDTHOME/examples and run:
  8. java examples.sound.SoundServer -server $SERVER -port 4463 -type socket
  9. Start the Stock Server with:
  10. java examples.stock.StockServer -server $SERVER -port 4464 -type socket
  11. Start the Whiteboard server with:
  12. 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.
  1. Change directories to the $JSDTHOME/examples directory.
  2. Launch appletviewer with the name of the .html file that contains the example you want to run.
  3. 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:

  1. Set your environment variables as described in Setting Up JSDT.
  2. 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
  1. To start the Chat user application, change directories to $JSDTHOME/examples and run:
  2. java examples.chat.ChatUser -width 300 -height 250 -server $SERVER -port 4461 -type socket
  3. To start the Ppong user application, change directories to $JSDTHOME/examples and run:
  4. 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
  5. To start the Stock user application, change directories to $JSDTHOME/examples and run:
  6. java examples.stock.StockUser -stocks SUNW+NSCP+IBM -server $SERVER -port 4464 -type socket
  7. To start the Whiteboard user application, change directories to $JSDTHOME/examples and run:
  8. java examples.whiteboard.WhiteBoardUser -width 600 -height 350 -server $SERVER -port 4466 -type socket


Copyright (c) 1996-99 Sun Microsystems, Inc.
All Rights Reserved