### Installing the Server API

When you install JReport Server, JReport Server API is also installed at the same time. After installation, you will have the following files:

- In `<install_root>\lib`:
  - JRESServlets.jar (local calls)
  - JREngine.jar (local calls)
  - JRSRMI.jar (remote RMI calls)
  - servlet.jar
  - hsqldb.jar
  - log4j-1.2.8.jar
  - sac.jar
  - commons-codec-1.2.jar
  - commons-logging-1.1.jar
  - quartz-all-1.6.5.jar
- In `<install_root>\derby\lib`:
  - derby.jar
  - derbyclient.jar
  - derbynet.jar
  - derbytools.jar

The Server API classes are stored in the archive file JRESServlets.jar.

When you install JReport Designer, the libraries for JReport Server can also be found in `<designer_install_root>\server\lib` since JReport Designer includes a full JReport Server for previewing reports.

If you are calling the Server API directly in the same JVM as JReport Server, you need to set the classpath environment variable to the local versions of the classes. Append the following jar files to your class path that compile and run applications which call the Server API:

`<install_root>\lib\JRESServlets.jar; <install_root>\lib\JREngine.jar; <install_root>\lib\servlet.jar; <install_root>\lib\hsqldb.jar; <install_root>\lib\log4j-1.2.8.jar; <install_root>\lib\sac.jar; <install_root>\lib\commons-codec-1.2.jar; <install_root>\lib\commons-logging-1.1.jar; <install_root>\lib\quartz-all-1.6.5.jar; <install_root>\derby\lib\derby.jar; <install_root>\derby\lib\derbyclient.jar; <install_root>\derby\lib\derbynet.ja; <install_root>\derby\lib\derbytools.jar;`

If you are calling the Server API using RMI from a different JVM or different server than where JReport Server is running, you need to set the classpath environment variable to the remote libraries. Append the following jar files to your class path that compile and run applications which call the Server API:

`<install_root>\lib\JRSRMI.jar; <install_root>\lib\servlet.jar; <install_root>\lib\hsqldb.jar; <install_root>\lib\log4j-1.2.8.jar; <install_root>\lib\sac.jar; <install_root>\lib\commons-codec-1.2.jar; <install_root>\lib\commons-logging-1.1.jar; <install_root>\lib\quartz-all-1.6.5.jar;`

Notes:

- If you are not using Derby as your Server DBMS, you need to replace the Derby libraries with the JDBC driver for your DBMS system.
- chart.jar is used in HTML applet and should be placed after jrengine.jar in the class path so as to avoid exceptions.
- If you want to export reports to the following formats, you should add the corresponding class package or jar with a valid path to the class path:
  - To e-mail or use the E-mail Notification function: activation-1.1.jar and mail-1.4.jar.
  - To FTP: commons-net-ftp-2.0.0.jar.
  - To PDF & Page Report Result: itext_1.5.4.jar.
  - To Excel: poiHSSF_151.jar.
  - To XML: xml-apis.jar and xercesImpl.jar.
  - To Page Report Result: JRWebDesign.jar.