Command Line Application

The javaxt-server library is compiled with a main class so you can use it as a simple, standalone web server to serve static files (e.g. html, css, images, etc).

To start the server simply run the following command:

java -jar javaxt-server.jar -dir /path/to/website

Command line arguments

The command line interface supports the following options:
  • -p to specify which port(s) to run on
  • -debug to specify whether to output debug messages to the standard output stream.
  • -dir to specify a path to a directory where html, js, css, images are found. The server will server content from this directory to web clients.

If no command line arguments are provided, the server will start on ports 80 and 443 and will not serve any files. Instead, the server will respond to HTTP requests by simply echoing the HTTP request headers. This basic response can be used to benchmark performance.