This section describes how to use the jWebSocket Server on the various operating systems including Windows, Mac OS and Linux. This topic will be interesting for you especially when you want to evaluate jWebSocket or when you are a developer and intend to develop new client software based upon the jWebSocket Server. The jWebSocketServerBundle-<version>.jar includes all required libraries and provides the ready-to-use folder structure. The jWebSocket Server can easily be started from the shell or command line window without any installation or special configuration.
Like all normal desktop applications the jWebSocket Server is terminated when you log off the system. Thus for production systems it is recommended to use either the jWebSocket Service (for Windows) or the jWebSocket Web Application (for all operating systems). Please refer to the bundled versions in the download section.
The jWebSocket Server is based on pure Java technology. For your server please ensure that you have the Java Runtime Environment (JRE) 1.6 or higher installed and that the JAVA_HOME environment variable refers to the root folder of this Java installation. If not, you can get it here. For Windows environments, we recommend to add the path to java.exe into your PATH environment variable. If not, you may need to adjust the provided start batch or script. Please also ensure that the JWEBSOCKET_HOME and JWEBSOCKET_EE_HOME environment variables refer to the root folder of the jWebSocket installation as described below.
To set up the jWebSocket server please follow these instructions:
Running jWebSocketServerBundle.jar in the command shell
Then you successfully ran jWebSocketServer.jar and you are able to test it, then if you want to try your server, you can play around with one of the following clients:
jWebSocket Java Client 1.0 RC0 (b30401)
Requirements for Linux/Ubuntu
For special requirements on Ubuntu please refer to our Linux Tips page.
Command line arguments
These are the command line arguments interpreted by the jWebSocketServer-<version>.
For MS-Windows environments the jWebSocketServer-<version>.zip from the download area includes the batch file jWebSocketServer-<version>.bat.
@echo off echo Starting the jWebSocket Server... java -jar ..\libs\jWebSocketServerBundle-<version>.jar %1 %2 %3 %4 %5 %6 %7 %8 %9 pause
From the Windows command line you can call jWebSocketServer.bat with the above mentioned optional arguments.
For Ubuntu environments the jWebSocketServer-<version>.zip from the download area includes the script jWebSocketServer-<version>.sh.
#!/bin/sh if [ ! -d "$JWEBSOCKET_HOME" ]; then JWEBSOCKET_HOME=$(cd `dirname $0` && pwd)/.. export JWEBSOCKET_HOME fi java -jar $JWEBSOCKET_HOME/libs/jWebSocketServerBundle-<version>.jar %1 %2 %3 %4 %5 %6 %7 %8 %9
From the shell window you can run jWebSocketServer.sh with the above mentioned optional arguments.
Copyright © 2013 Innotrade GmbH. All rights reserved.