### Starting using launch files

After you have installed JReport Enterprise Server, many batch files are automatically generated in `<install_root>\bin`. They are for assisting you with using and maintaining JReport Enterprise Server. All of these batch files can be edited to suit different circumstances. However, make sure that you understand their functions when you want to edit them.

The following are the JReport Enterprise Server launch files.

#### browser.bat

This tool detects the default client browser and installation path. It is invoked by launchpad.bat.

#### CmdSender.bat/CmdSender.sh

This tool is for sending commands to JReport Enterprise Server. If the option "-s" or "-p" is not used, the JVM system property "reporthome" must be defined so that CmdSender.bat/CmdSender.sh will use it to get data from the local machine.

Usage

cmdsender [-s:<server> -p:<port> -u:<user>] -w:<password>
admin|shutdown|localshutdown|(local:on|off)

Options

- -s
  The server host name.
- -p
  The administration port.
- -u
  The admin user name.
- -w
  The admin password.
- shutdown
  Shuts down the server.
- localshutdown
  Shuts down the local server.
- local
  The administration tasks are available to local host only.
- gc
  Run the Java garbage collector.

#### DBMaintain.bat/DBMaintain.sh

This tool is for administrators to backup and restore JReport Enterprise Server data. It is invoked by the following command line:

Usage

DBMaintain -[?|cleanup|B<[systables|profiling]:<filename>>|R<[systbales|profiling]:<filename>>]

Options

- -?
  Displays the usage information and then exits.
- -cleanup
  Checks integrality of the server data and cleans up the invalid data.
- -Bsystables:<filename>/-Bprofiling:<filename>
  Backup the data in the systable database with the related data to a specified file.

  For example, for backing up the server data systables to file `c:\jsback.dat`, you can type:

  `DBMaintain -Bsystables:c:\jsback.dat`

- -B0systables:<filename>/-B0profiling:<filename>
  Only backup the data in the systable database.
- -Rsystables:<filename>/-Rprofiling:<filename>
  Restore the data including the related data outside the systable database from a specified file.

  For example, for restoring server data systables from the file `c:\jsback.dat`, you can type:

  `DBMaintain –Rsystables:c:\jsback.dat`

- -R0systables:<filename>/-R0profiling:<filename>
  Only restore the data in the systable database.

#### DJREntServer.bat/DJREntServer.sh

This tool is used to launch JReport Enterprise Server with debug and log information. The output log files are in the `<install_root>\logs` directory. In case of problems, you may run this batch to reproduce the problem. Open the files to see the detail information and find out the problem. Send the log files to support@jinfonet.com if you are unable to resolve the problem.

Usage

DJREntServer [-?|-p <port>|-ap <adminport>|-realm <realmname>|-l backlog|-m <max>
|-t <timeout>|-s <filename>|-web <directory>|-env|-silent|
|-local|-vDebug|-vError|-jrs.admin.server <host:port>|-cleanup]

Options

- -?
  Prints this help message.
- -p <port>
  The port number to listen on.
- -ap <adminport>
  The port number which is used by the administration tools.
- -realm <realmname>
  Specifies the active realm.
- -l <backlog>
  The maximum queue length for incoming connections.
- -m <max>
  The maximum number of connection handlers.
- -t <timeout>
  The connection timeout in milliseconds.
- -s <filename>
  The servlet property file name. If this option is not used, the file servlet.properties in `<install_root>\bin` will be used as the servlet property file when launching JReport Enterprise Server.
- -web <directory>
  The root directory when accessing the server via the web, its default value is `<intall_root>\public_html`.
- -env
  Prints the environment.
- -silent
  No output is sent to the console.
- -local
  The administration tasks are available on local host only.
- -vDebug
  Enables JReport Engine to output messages to a file and sets all log files' trace levels to INFO and error levels to WARN.
- -vError
  Enables JReport Engine to output messages to a file and sets all log files' trace levels to OFF and error levels to ERROR.
- -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.

#### JREntServer.bat/JREntServer.sh

This tool is used to launch JReport Enterprise Server in standalone mode without any predefined options.

On Windows, you can start server by double-clicking on JREntServer.bat. If you cannot start the server successfully in this way, the reason will be displayed in the MS-DOS command prompt.

Usage

JREntServer [-?|-p <port>|-ap <adminport>|-realm <realmname>|-l backlog|-m <max>

|-t <timeout>|-s <filename>|-web <directory>|-env|-silent|

|-local|-vDebug|-vError|-logall|-jrs.admin.server <host:port>|-cleanup]

Options

- -?
  Prints this help message.
- -p <port>
  The port number to listen on.
- -ap <adminport>
  The port number which is used by the administration tools.
- -realm <realmname>
  Specifies the active realm.
- -l <backlog>
  The maximum queue length for incoming connections.
- -m <max>
  The maximum number of connection handlers.
- -t <timeout>
  The connection timeout in milliseconds.
- -s <filename>
  The servlet property file name. If this option is not used, the file servlet.properties in `<install_root>\bin` will be used as the servlet property file when launching JReport Enterprise Server.
- -web <directory>
  The root directory when accessing the server via the web, its default value is `<intall_root>\public_html`.
- -env
  Prints the environment.
- -silent
  No output to the console.
- -local
  The administration tasks are available on local host only.
- -vDebug
  Enables JReport Engine to output messages to a file and sets all log files' trace levels to INFO and error levels to WARN.
- -vError
  Enables JReport Engine to output messages to a file and sets all log files' trace levels to OFF and error levels to ERROR.
- -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.

Note: You may need to set an appropriate -Dfile.encoding option in the file to start JReport Enterprise Server in order to view characters correctly.

#### jrenv.bat/jrenv.sh

This tool is for generating the report environment file report.env in the current directory. This file can help the Jinfonet support staff assist you when you run into problems.

#### launchpad.bat

This tool is used to launch JReport Enterprise Server in the standalone mode and open the JReport Server Launch Pad page.

#### makewar.bat/makewar.sh

See here.

#### MigrationBV52.bat/MigrationBV52.sh

This tool is used to convert all the resources from JReport versions which are lower than V5.2 Build 590 to the resources of JReport Enterprise Server V8. If you install the new version to the same folder as the old one, the parameter can be omitted.

Usage

MigrationBV52 [orgReportHome]

Options

- orgReporthome
  The reporthome of the original JReport Enterprise Server. If this parameter is not provided, the value of "reporthome" of new JReport Enterprise Server will be used as its value.

#### MigrationV52.bat/MigrationV52.sh

This tool is used to convert all the resources of which the versions are between V5.2 Build 590 (included) and V6 (not included) to the resources of JReport Enterprise Server V8. If you install the new version to the same folder as the old one, the parameter can be omitted.

Usage

MigrationV52 [orgReportHome]

Options

- orgReporthome
  The reporthome of the original JReport Enterprise Server. If this parameter is not provided, the value of "reporthome" of new JReport Enterprise Server will be used as its value.

#### NJREntServer.bat/NJREntServer.sh

This tool is used to launch JReport Enterprise Server without JIT option. If your server often crashes with JIT option, try this batch file instead of JREntServer.bat.

Usage

NJREntServer [-?|-p <port>|-ap <adminport>|-realm <realmname>|-l backlog|-m <max>

|-t <timeout>|-s <filename>|-web <directory>|-env|-silent|

|-local|-vDebug|-vError|-logall|-jrs.admin.server <host:port>|-cleanup]

Options

- -?
  Prints this help message.
- -p <port>
  The port number to listen on.
- -ap <adminport>
  The port number which is used by the administration tools.
- -realm <realmname>
  Specifies the active realm.
- -l <backlog>
  The maximum queue length for incoming connections.
- -m <max>
  The maximum number of connection handlers.
- -t <timeout>
  The connection timeout in milliseconds.
- -s <filename>
  The servlet property file name. If this option is not used, the file servlet.properties in `<install_root>\bin` will be used as the servlet property file when launching JReport Enterprise Server.
- -web <directory>
  The root directory when accessing the server via the web, its default value is `<intall_root>\public_html`.
- -env
  Prints the environment.
- -silent
  No output to the console.
- -local
  The administration tasks are available on local host only.
- -vDebug
  Enables JReport Engine to output messages to a file and sets all log files' trace levels to INFO and error levels to WARN.
- -vError
  Enables JReport Engine to output messages to a file and sets all log files' trace levels to OFF and error levels to ERROR.
- -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.

#### register.bat

It is invoked by browser.bat.

#### RMIAuthFileCreator.bat/RMIAuthFileCreator.sh

This tool is used to generate the rmi authentication file. JReport Enterprise Server uses the authentication file to secure remote objects. If no argument was provided, an authentication file named "rmi.auth" will be created in `<install_root>\bin`, using the userid and install key of JReport Enterprise Server.

Usage

RMIAuthFileCreator [authFileName [userid key]]

Options

- ?
  Shows the usage message.
- authFileName
  The RMI authentication file name. If only input this argument, the userid and install key of JReport Enterprise Server will be used to create the authentication file.
- userid
  The user ID, which will be used to generate the contents of the authentication file.
- key
  The key which will be used to generate contents of the authentication file.

#### rp.bat/rp.sh

This tool is for replacing user ID and license key.

Usage

`rp UID Key`

#### rptconv.bat/rptconv.sh

This tool is for converting old report schema to be current with Version 8.

Usage

`rptconv "-source=source_path" ["-target=destination_path"] [-r] [-s]`

Options

- -source
  Specify the source path of the reports that are to be converted.
- -target
  Specify the destination path for the converted report(s).
- -r
  Replace the source report with the converted version.

  If this option is set, ["-target=destination_path"] is ignored.

  If both "-r" and "-target" are not specified, the converted reports are saved in the same directory as the source reports and named as "converted_SourceReportName".

- -s
  Convert all the reports in the specified directory, including the reports in all subdirectories.

Examples

- To convert a single report:

  `rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls" "–target=C:\temp"`

  This will convert C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls to C:\temp\InvoiceReport.cls.

  `rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls" "–target=C:\temp\1.cls.xml"`

  This will convert C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls, save the converted report to `C:\temp`, and name it as "1.cls.xml" (if license allows).

  `rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls"`

  This will convert C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls, save the converted report in the same directory, and name it as "converted_InvoiceReport.cls".

  `rptconv "-source=C:\JReport\Server\jreports\SampleReports\InvoiceReport.cls" -r`

  This will overwrite C:\JReport\Server\jreports\SampleReportss\InvoiceReport.cls.

- To convert all reports (*.cls, *.rpt, *.clx, *.cls.xml) in a directory:

  `rptconv "-source=C:\JReport\Server\jreports" "–target=C:\temp"`

  This will convert all the reports in C:\JReport\Server\jreports and save the converted reports to `C:\temp`. The converted reports use the same file names as source reports.

  `rptconv "-source=C:\JReport\Server\jreports" "–target=C:\temp" -s`

  This will convert all the reports in C:\JReport\Server\jreports and in the subdirectories and save the converted reports to `C:\temp`. The converted reports take the same file names and directory structure as source reports.

  `rptconv "-source=C:\JReport\Server\jreports" "–target=C:\temp\*.cls" -s`

  This will convert all the reports in C:\JReport\Server\jreports and in the subdirectories and save the converted reports to `C:\temp`. The converted reports take the same directory structure as source reports and the suffixes of their file names are all changed to ".cls".

  `rptconv "-source=C:\JReport\Server\jreports" -r -s`

  This will convert all the reports in C:\JReport\Server\jreports and in the subdirectories. The converted reports overwrite the source reports.

  `rptconv "-source=C:\JReport\Server\jreports"`

  This will convert all the reports in C:\JReport\Server\jreports. All the converted reports are saved in the same directory and named as "converted_SourceReportName".

- To convert a type of reports with same suffixes in a directory:

  The usage is similar to converting a directory. You can specify the wildcard to filter reports, for example:

  `rptconv "-source=C:\JReport\Server\jreports\SampleReports\*.cls" "–target=C:\temp"`

  This will convert all the reports with the suffix ".cls" in `C:\JReport\Server\jreports\SampleReports` and save the converted reports to `C:\temp`.

Notes:

- There must be one and only one catalog file in the directory where the reports to be converted reside.
- If the reports to be converted contain UDO or UDF, make sure the corresponding classes or jars are included in the class path of rptconv.bat/rptconv.sh.

#### startAdministration.bat

This tool is used to launch the JReport Administration page from the Start menu after the server is started.

#### startConsole.bat

This tool is used to launch the JReport Console page from the Start menu after the server is started.

#### stopServer.bat

This tool is used to exit JReport Enterprise Server from the Start menu.

#### stopServer.sh

This tool is used to exit JReport Enterprise Server.