How to configure Artifactory to run with a different JAVA version than what is configured under JAVA_HOME on Windows

JFrog Support
2016-10-06 13:35

If you wish to have the system environment variable set to JAVA 7 for other applications and have Artifactory 4.x run on JAVA 8, you can create a new environment variable called for example 'ART_JAVA_HOME' which points to your JDK 8 installation.

Then you would have to edit the following file: $ARTIFACTORY_HOME/tomcat/bin/setclasspath.bat, please make sure to first create a backup of it before editing: 


What you need to edit here are 2 pointers that should point to the new variable instead of the old:

1. Under the 'rem Otherwise either JRE or JDK are fine' title, change the 'if not "%JAVA_HOME%" == "" goto gotJavaHome' to use the new variable

2. Under the ':gotJavaHome' section, change the 'set "JRE_HOME=%JAVA_HOME%"' to use the new variable.