I'm preparing for a Tomcat installation. I'm in a DEV environment, and need to install the JDK which also includes JRE. I've had success, but I think I have some weird PATH
issues. I was referencing - not explicitly - the instructions here.
- JDK install path - C:\java
- JRE install path - C:\java\jre
- JAVA_HOME variable - C:\java
- PATH var (top of list) - C:\java\bin
- PATH also includes - C:\Program Files (x86)\Common Files\Oracle\Java\javapath
When I test from the command line to see if things are OK with java -version
, I get this error:
<JAVA_HOME>/lib/ext exists, extensions mechanism no longer supported; Use -
classpath instead.
.Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
However, if I manually browse to C:\java\jre\bin, and run java -version
, it tells me the version just fine, no errors.
It's when I run java -version
from C:\java\bin\ where I have the issue.
What's the difference between the java.exe in JRE and JDK? Why is the JDK java.exe so unhappy?