Jump to content
JasperReports Library 7.0 is now available ×
  • This documentation is an older version of JasperReports Server Build Guide - Community Edition. View the latest documentation.

    Setting Java JVM Options

    JasperReports Server needs larger Java memory settings than default values in order to run properly. However, for development work, the settings used can be simpler than settings that are recommended for a production deployment. For full information on recommended JAVA_OPTS settings, please refer to the JasperReports Server Installation Guide.

    Tomcat and JBoss JVM Options

    The following tables present some typical settings of JVM options that affect JasperReports Server. For space reasons, some of the options are displayed on multiple lines; make sure to set all options.

    JVM Options on Windows

    Options for Java 1.6 and 1.7

    set JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx2048m -XX:PermSize=32m -XX:MaxPermSize=512m[/code]
    set JAVA_OPTS=%JAVA_OPTS% -Xss2m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled[/code]                    

    For Oracle

    set JAVA_OPTS=%JAVA_OPTS% -Doracle.jdbc.defaultNChar=true[/code]                    

    JasperReports Server doesn’t provide a virtual X frame buffer on Linux. If your Linux applications are graphical, set the ‑Djava.awt.headless=true to prevent Java from trying to connect to an X-Server for image processing.

    JVM Options on Linux and Mac OSX

    Options for Java 1.6 and 1.7

    export JAVA_OPTS="$JAVA_OPTS -Xss2m [/code]
    export JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"[/code]                    

    For Oracle

    export JAVA_OPTS="$JAVA_OPTS -Doracle.jdbc.defaultNChar=true"[/code]                    

    There are a number of ways to set JVM options. For example, you can add your JAVA_OPTS settings to these files:


    Add JVM Options Below the Lines Shown Here:


    set JAVA_ENDORSED_DIRS=%BASEDIR%commonendorsed[/code]                    



    <tomcat>/bin/setenv.bat or


    JAVA_OPTS setting can go anywhere in this file.



    set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% [/code]                        


    export JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"[/code]                    


    For information on recommended JAVA_OPTS settings for all certified application servers, please refer to the JasperReports Server Installation Guide.

    Configuring the JasperReports Server License File

    Commercial editions of JasperReports Server require a license file. The source code includes an evaluation license. You can use this license or replace it with the one you received from technical support or your sales representative.

    Configuring the License for All Application Servers

    The main source build section describes placing a license in the home folder of the user running the application server. For this information please refer to Put jasperserver.license in Place.

    Configure the License in the Tomcat Scripts

    If you would like to locate your jasperserver.license in a specific folder, you can set a Java property in the shell script files that are used to control Tomcat.

    JasperReports Server will look for a property named js.license.directory and will use the folder pointed to as the location to find the jasperserver.license file.

    For instance, if you wanted to point JasperReports Server to the license file in the root of the source package, you could update the following shell script:





    And you could update the file with the following setting:



    The jasperserver.license file can reside anywhere on the file system that is accessible from your application server. The js.license.directory setting should point to the folder where the jasperserver.license file is found.


    For full information on configuring the jasperserver.license for all certified application servers, please refer to the JasperReports Server Installation Guide.

    User Feedback

    Recommended Comments

    There are no comments to display.

    This is now closed for further comments

  • Create New...