Set a new default JRE for test projects in Katalon Studio
You can set your desired JRE package as the default one to compile and run test projects. You can also override the default configuration in console mode by using the environment variable.
Katalon Studio version before 9.0.0 uses the default embedded Java Runtime Environment (JRE) v8 to run a Katalon Studio instance and compile test projects.
From version 9.0.0 onwards, Katalon Studio only supports default JRE from v17.
Note:
- This change applies to the JRE used to run your test projects, not the JRE used to run Katalon Studio.
- When updating from previous versions to 9.0.0, you need to remove default JRE and update any imported libraries in order to use Katalon Studio as normal. For further instruction, refer to Add external libraries to a project.
This guide takes you through the steps to:
- Set a new default JRE for a Katalon Studio instance.
- Apply the new JRE to a test project.
- Run tests with another JRE in the command line.
Set a new default JRE for a Katalon Studio instance
- For Katalon Studio 7.9.0 to 8.6.8: The desired JRE version (from 8 to 14) installed on your machine.
- For Katalon Studio 9.0.0 and later: The desired JRE version (from 17 onwards) installed on your machine.
Use the newly added JRE in a test project
Run tests with another JRE in the command line
Important:
- For Katalon Studio 7.9.0 to 8.6.8: The desired JRE version (from 8 to 14) installed on your machine.
- For Katalon Studio 9.0.0 and later: The desired JRE version (from 17 onwards) installed on your machine.
- An active KRE license. To learn more about activating licenses, you can refer to this document here: Katalon Runtime Engine license overview.
To execute a test suite or a test suite collection with another JRE in console mode, you need to add the
KATALON_JAVA_HOME= <JRE_location>
environment variable and use it before Katalon commands. Below is a sample command on macOS and Linux for your reference:export KATALON_JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home.
./katalonc ...