[an error occurred while processing this directive]

Running the TransJam Server

The server is launched by running the Java Virtual Machine and passing it the server class name.

We want the server to continue running until we shut it down, or the computer is rebooted. So we can run the server using the Unix "nohup" command. That tells the OS not to "hang up" the application when the terminal window is closed.

Here is the command to run the server:

nohup java -cp transjam_server.jar com.transjam.server.Server &
You can pass options to the server using a properties file called "transjam.properties". The syntax for setting properties is:
key=value
For example, the set the port that the server listens to for clients to 18225, put this in the properties file:
portnum=18225

TransJam Properties

portnum Set port number to listen to for clients. The default will be printed if you use the -h option.
maxclients Set maximum number of clients that may log in at one time, cannot exceed the maximum specified by the license.
debug Select debug messages printed to stdout. Option can be any combination of these letters, for example "usc":
    u = users, login and logout messages
    s = rooms, when rooms are created and users enter or exit a room
    r = received, all messages received by server from clients, (Warning the r and t messages are very verbose and should be used with caution.)
    t = transmitted, all messages transmitted by server to clients, 
    c = chat, messages exchanged while chatting
timeout Set number of seconds before connection times out if client does not respond. Use zero for no timeout.
password Set the administrative password for the Admin Applet

For example:

nohup java -cp transjam_server.jar com.transjam.server.Server&
For convenience, we have placed the basic command with in a shell script. So simply enter:
source runserver

Auto Launch

You may wish to launch the TransJam Server automatically when the computer boots. That way you know the TransJam Server will always be running even if your server is shutdown and then restarted.

You might want to configure "xinetd" to launch the server automatically the first time a client logs on. But that is beyond the scope of this tutorial. Please enter "man xinetd".

[Previous] [Top] [Next]
[an error occurred while processing this directive]