JRE_HOME variable is not defined correctly (english)

…And yet, it was indeed well-defined.

(¿Buscas esta crónica en Español? Haz clic aquí)

That’s right, with this error, we begin today’s log; it will be brief and concise. The details are below.

We have an installation of an Apache Tomcat on Windows that, when executing the startup.bat script we see an error on the screen:

JRE_HOME variable is not defined correctly. The environment variable is needed to run this program.

At first glance, the error is evident, isn’t it? The environment variable is misconfigured. Let’s proceed and review the settings:

JAVA_HOME – checked!

JRE_HOME – checked!

PATH – checked!

All of them were correctly configured, pointing to the corresponding directory. So, what’s to do next?

Searching on Google, most references pointed to the same issue and the most obvious solution: errors in how the directories were declared in the variables, whether due to special characters, spaces, missing slashes, among others.

When I browsed the JRE installation directory to verify if the bits version matched the required one (we are using the 64-bit version), the error finally showed up! The problem was the bin directory of the JRE was empty, no Java executables there

Perhaps somebody thought that it was a development machine and the JRE was not needed… It would have been quite useful to see an error from the startup.bat script stating the JRE_HOME directory was empty, instead of the generic message «IS NOT CORRECTLY DEFINED».

I hope this log will save you time (and money).

One response to “JRE_HOME variable is not defined correctly (english)”

  1. […] (Looking for this log in English? Click here!) […]

Deja un comentario

Descubre más desde Crónicas de Programación

Suscríbete ahora para seguir leyendo y obtener acceso al archivo completo.

Seguir leyendo