Running as a Windows Service

A tool is provided to assist you in installing JReport Server as a Windows Service. This tool JRservice.exe can be found in <install_root>\bin.

You will get the following information if you run JRservice.exe without any options:
Usage:

JRService -install [-interactive] to install the service
JRService -remove                 to remove the service

    -interactive to enable JReport Server service
                 to interact with the desktop

StartServiceCtrlDispatcher being called.
This may take several seconds. Please wait.

Configuring JReport Server service

The parameters for the Windows service of JReport Server are read from the file NTService.ini in <install_root>\bin.

In this file you will find three parameters specified, as shown in the following example:
JavaVM="C:\jdk1.6.0_17\jre\bin\java.exe" 
StartArg= "-Dinstall.root=C:\JReport\Server"
-classpath "C:\JReport\Server\lib\JREntServer.jar;
C:\JReport\Server\lib\JREngine.jar;C:\JReport\Server\lib\servlet.jar;C:\TEMP"...
-Djava.compiler=NONE -Dreporthome=C:\JReport\Server jet.server.JREntServer
ShutdownArg= "-Dinstall.root=C:\JReport\Server" 
-classpath "C:\JReport\Server\lib\JREntServer.jar;
C:\JReport\Server\lib\JREngine.jar;C:\JReport\Server\lib\servlet.jar;C:\TEMP" ...
-Djava.compiler=NONE 
-Dreporthome=C:\JReport\Server jet.server.CommandSender localshutdown

Starting the service

There are two ways to start the JReport Server service.

You can change the options in the file NTService.ini in <install_root>\bin before you start the service. In the example above, there are no options specified in StartArg. If you would like to set all error log levels to WARN and trace log levels to INFO, you will need to append -logall at the end, as in the following example:
... 
StartArg= "-Dinstall.root=C:\JReport\Server"
-classpath "C:\JReport\Server\lib\JREntServer.jar;
C:\JReport\Server\lib\JREngine.jar;C:\JReport\Server\lib\servlet.jar;
C:\JReport\Server\lib\log4j-1.2.8.jar;C:\TEMP" -Djava.compiler=NONE 
-Dreporthome=C:\JReport\Server jet.server.JREntServer -logall
...

Reference: For more information on the options available, see Starting JReport Server using Java.

Stopping the service

There are three ways for you to stop the JReport Server service:

Notes: