Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JAVA_HOME environment variable and Java JDK fun

Tags:

java

java-home

I wanted to get Java running at 1.6xxx - I changed the JAVA_HOME variable and pointed it to the directory C:\Program Files\Java\jdk1.6.0._16.

I restart the PC - and I think I can check which version of Java my machine is pointing at - but it still points to the older version of Java e.g v1.5.0_16

Can you help me rejog my memory on correct setup for Java JDK?

java home

like image 285
Vidar Avatar asked Sep 29 '10 11:09

Vidar


2 Answers

You need to reset your path variable to point to 1.6

something like
alt text

Additionally, make sure the variable JAVA_HOME is also set with the above location.

like image 110
jmj Avatar answered Oct 13 '22 23:10

jmj


JAVA_HOME is used by other applications, such as Tomcat. Windows just checks the PATH environment variable for locations where it can find the java executable.

like image 20
Qwerky Avatar answered Oct 14 '22 01:10

Qwerky