Question

I have installed the JDK, to C:\jdk, the JAVA_HOME variable is set to C:\jdk\jdk, and when I echo %JAVA_HOME% I get C:\jdk\jdk. Yet Tomcat complains.

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

I seem to be having errors with my environment variables. Often when I start a Command Line instance from the start menu, I receive different variables, to when I start an instance from the Windows 7 Right click > Open Command Window here.

What gives?

Was it helpful?

Solution

does C:\jdk\jdk have a bin/ directory? if not, try setting java home to just c:\jdk. failing that find out where the bin/ directory that has javac.exe in it and use the parent directory of bin/ for java home.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top