Configuring Java

Changing Java installation path

The path to the Java installation on your server can be updated by following the procedure below:

  1. Stop Squore Server

  2. Edit <SQUORE_HOME>/server/bin/standalone.conf on Linux or <SQUORE_HOME>/server/bin/standalone.conf.bat on Windows

  3. Change the value of the JAVA_HOME, as shown below:

    JAVA_HOME="/opt/java/jre8"

    or

    set "JAVA_HOME=C:\jre8"
  4. Start Squore Server

Changing the Java Heap size

The maximum amount of memory used by Squore Server’s Java process at runtime is defined at installation time. If you have not specified any value, the maximum amount of memory used will be 25% of the RAM available on the machine. It is recommended to keep the memory allocated to Squore under 25% of the total physical RAM so that other Squore modules (especially the database) or external processes (the OS and some Data Providers like Checkstyle or FindBugs) still have enough resources available.

This setting can be changed by following this procedure:

  1. Stop Squore Server

  2. Edit <SQUORE_HOME>/server/bin/standalone.conf on Linux or <SQUORE_HOME>/server/bin/standalone.conf.bat on Windows

  3. Change the value of the Xmx parameter, as shown below:

    JAVA_OPTS="$JAVA_OPTS -Xms64m -Xmx1512m

    or

    set "JAVA_OPTS=%JAVA_OPTS% -Xms64M -Xmx1512M -XX:MaxPermSize=256M"

    In the example above, 1512M is the default value for a machine with 6Gb RAM, i.e. 25% of 6048Mb.

  4. Start Squore Server

Please note that all other parameters (as "MaxPermSize") are advanced settings. These do not have to be modified as part of a classic use of Squore.