### Starting using Java

The class of the standalone server is jet.server.JREntServer. You can start JReport Server with the following command instead of using the generated batch files:

`JAVA -classpath <classpath> -Djava.compiler=NONE -Dreporthome=<install_root> jet.server.JREntServer [options]`

- -classpath
  The classpath must include the following packages originally in your `<install_root>\lib`: JRESServlets.jar; JREntServer.jar; JREngine.jar; servlet.jar; log4j-1.2.8.jar;
- -Djava.compiler=NONE
  This is without JIT. This is not a required option. However, if you encounter problems running the server and you think that they relate to the Java VM, you can try turning off the JIT compiler and then running again.
- -Djreport.url.encoding
  Specifies the encoding to encode/decode escape characters in URL strings. If not specified, the system default encoding will be used. For example: java ... -Djreport.url.encoding=8859-1...
- -Dreporthome
  This is where JReport Server is installed. It is the Destination Location you specified when you installed it. This option is required. When you set the reporthome, upon launching, JReport will try to find the jslc.dat and report.ini files in `<install_root>\bin` and check whether they are valid. Jslc.dat is the License control file. Open report.ini, and you will find the configuration information, including the temp, template and the help path. JReport will use the temp path to export the temporary files so you should make sure that the temp folder specified in report.ini exists and has space available.
- -Dfile.encoding
  Specifies the encoding to encode/decode escape characters in the server data. If not specified, the system default encoding will be used. For example: java ... -Dfile.encoding=8859-1...
- -Dresolution
  Sets the system resolution in DPI. If not specified, the system default resolution will be used, which is the resolution of your monitor, for example, -Dresolution=96.
- [options]

  Option | Description
  --- | ---
  -? | Print brief help message.
  -p port | The port that this server listens on, default is 8888.
  -ap adminport | The port number that the remote administration uses, default is 8889.
  -l backlog | Maximum length of queue for incoming connection indications.
  -m max | Maximum number of connection handlers.
  -t timeout | Connection timeout in milliseconds.
  -s filename | Servlet property file name.
  -realm realmname | Active realm when the server starts up. The specified realm should exist, otherwise the server will use an existing realm as the active realm. The server will then record a warning message in the log file, and set the selected active realm by the server.realm.active property in the server.properties file.
  -web directory | Web application server root directory, default is `<intall_root>\public_html`.
  -local | Administration on local host only.
  -vDebug | Enables JReport Engine to output messages to a file and sets engine log file's trace level to INFO and error level to WARN.
  -vError | Enables JReport Engine to output messages to a file and sets engine log file's trace level to OFF and error level to ERROR.
  -env | Print environment settings when the server starts up.
  -silent | Outputs nothing, not even the server start information.
  -log[:file Name] (deprecated) | Outputs JReport Engine messages to the log file as specified and uses the -vDebug level.
  -logall | Sets all loggers' trace level to INFO and error level to WARN.
  -jrs.admin.server host:port | The admin server host and RMI port.
  -cleanup | Checks integrality of the server data and cleans up the invalid data.

Notes:

- For detailed information on how to configure the logging and debugging information, read the LogConfig.properties file in `<install_root>\bin`.
- Some of the common options will be used in later chapters. In addition, JReport has automatically generated some batch files for you so that you do not have to write a complicated command line. You can find these in the `<install_root>\bin` directory.