![eclipse on mac looking for wrong java version eclipse on mac looking for wrong java version](https://directory.apache.org/studio/static/images/screen_ldif_editor.jpg)
It doesn’t apply for Tomcat installed as a service.
#Eclipse on mac looking for wrong java version zip
On Windows, create the setenv.bat file with the following content: set "JRE_HOME=C:\Program Files\Java\jdk1.7.0_03\jre"Įxit /b 0On *nix, create the setenv.sh file with the following content: JRE_HOME=/usr/java/jdk1.7.0_03/jreĬATALINA_PID="$CATALINA_BASE/tomcat.pid"Note that this way only works with Tomcat installed from a zip distribution. This file does not exist by default, so create such file and place it under CATALINA_BASE\bin directory ( CATALINA_BASE is the Tomcat installation directory).
![eclipse on mac looking for wrong java version eclipse on mac looking for wrong java version](https://www.pushing-pixels.org/wp-content/uploads/2020/06/eclipse-vm.png)
Changing JRE by using “setenv” scriptWe can change the JRE for Tomcat by setting the JRE_HOME variable in a script file called setenv.bat (on Windows) or setenv.sh (on *nix). JRE_HOME=C:\Program Files\Java\jre7Notice that updating the JAVA_HOME or JRE_HOME environment variables will affect all the applications that depend on them, so if you want to look for a more independent approach, see the second way as described below. Here’s an example of a valid value for the JRE_HOME variable (path on Windows):
![eclipse on mac looking for wrong java version eclipse on mac looking for wrong java version](https://blogs.eclipse.org/sites/default/files/users/user180/compatibleprodlist.png)
Basically, an installation of Tomcat is running under the default JRE which can be found based on environment variables ( JAVA_HOME), or registry entries (on Windows) or the JRE is specified during installation (Tomcat is installed as a service).