JREs

Last published : Oct 07, 2026
In the rare event that a particular service cannot use the default JRE that is deployed to the Engines, a JRE can be packaged as a Grid Library. The Service’s top-level Grid Library then declares it as a dependency. When an Engine takes a Task, it then restarts using this JRE. Note that the JRE must be a supported version.
JREs are packaged as jre_name-version.gz or jre_name-version.zip where, jre_name includes jre-os. The version is the JRE version, for example, 11.x.x. The os is the platform, such as linux64 or win64.
For example, for linux 64: jre-linux64-11.x.x.tar.gz.
For a JRE Grid Library, you can optionally specify JVM arguments in the XML. To do so, add an <arguments> element to the root element. It can take any number of <property> elements, each containing a <name> element and an optional <value> element.
If the property has a value, the argument name=value is added. Otherwise, only the name argument is added.
If the same argument is set in the Engine Configuration and the Grid Library, the Grid Library overrides the Engine Configuration.
Note:
Specifying the JVM debug port inside a Grid Library results in unpredictable behavior and is not supported. Set this functionality with the Debug Start Portsetting on the Grid Components > Engines > Engine Configurationspage.
Related information

Example: Creating a Multi-Platform JRE Grid Library

Here is an example of how to use the same JDK version Grid Library for Linux and Windows:
**Note:**GridServer 7.1.1 includes Java Runtime Environment (JRE) gridlibs for Java 11, 17, and 21, but does not include a gridlib for Java 11. Note that Java 17 and 21 do not include separate JREs in the GridServer 7.1.1 package.
  1. Download the target JDK version installer for each targeted platform from the Oracle website, https://www.oracle.com/in/java/technologies/javase/jdk11-archive-downloads.html.
    For example, for Linux64, download jdk-11.x.x_linux-x64_bin.tar.gz and for Windows-x64, it is jdk-11.x.x_windows-x64_bin.zip.
  2. Extract the downloaded JDK tar.gz file for Linux or.zip file for Windows at the desired location.
  3. Create a grid-library.xml file with the following contents:
    For Linux:
       <?xml version="1.0" encoding="UTF-8"?>
          <grid-library jre="true" os="linux64">
          <grid-library-name>jre-linux64</grid-library-name>
          <grid-library-version>11.x.x</grid-library-version>
          <lib-path>
             <pathelement>./bin</pathelement>
             <pathelement>./lib</pathelement>
             <pathelement>./lib/server/</pathelement>
          </lib-path>
          </grid-library>
    For Windows:
       <?xml version="1.0" encoding="UTF-8"?>
       <grid-library jre="true" os="win64">
       <grid-library-name>jre-win64</grid-library-name>
       <grid-library-version>11.x.x</grid-library-version>
       <lib-path>
          <pathelement>jre/bin</pathelement>
          <pathelement>jre/lib</pathelement>
          <pathelement>jre/lib/server/</pathelement>
       </lib-path>
    </grid-library>
    Note that the order of pathelement is important. For example, if you want the server VM, then jre/lib/i386/server must come before jre/lib/i386. This also applies to the native_threads directory.
  4. Create the Grid Library archive for each platform containing the grid-library.xml that you created above and save the grid-library.xml in the extracted JDK folder.
  5. Rename the JDK folder to JRE folder for the targeted platform and OS with the JRE version number.
    For example, jre-linux64-11.x.x for Linux and jre-win64-11.x.x for Windows.
    6\. Archive the JRE folder to create JRE package as tar.gz file for Linux and .zip file for Windows.
    For example, jre-linux64-11.x.x.tar.gz for Linux and jre-win64-11.x.x.zip for Windows.
  6. Navigate to Services > Services > Grid Libraries.
  7. Select Upload Grid Libraryat the top-right of the page.
  8. Click Choose File, browse to choose the tar.gz or .zip JRE file, and then click Upload.
  9. Add the following dependencies to your application:
       <dependency>
          <grid-library-name>jre-win64</grid-library-name>
          <grid-library-version>11.x.x</grid-library-version>
       </dependency>
       <dependency>
          <grid-library-name>jre-linux64</grid-library-name>
          <grid-library-version>11.x.x</grid-library-version>
       </dependency>
After performing these steps your application uses the exact JRE version that you have specified for each platform.