How do I set the JAVA_HOME or JRE_HOME environment variables?

To run the agent on your Windows 2012 server, you'll need to first set your JAVA_HOME or JRE_HOME environment variables. You can either set global environment variables, or set them locally if you have multiple tomcat processes that all require different versions of the Java JDK. 

If you don't have either of these environment variables set up correctly, you'll get this error when attempting to run startup.bat:

"Neither the JAVA_HOME nor the JRE_HOME environment variable is defined. At least one of these environment variables is needed to run this program."

Setting these environment variables locally is easy! Simply navigate to your Agents folder and open the setenv.bat file inside of the bin folder. Under "@echo off", set your environment variables like this:

set JRE_HOME=C:\Program Files\Java\jre1.8.0_121

set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121

If your JDK was installed in another location, you'll need to input that location instead of the above path. 

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.