Should JAVA_HOME point to JDK or JRE?
Solution 1:
If you're doing any sort of development, or building with Maven or Ant, you need to point to the JDK (Java Development Kit) where utilities such as javac
(the Java Compiler) reside. Otherwise, you can point to the JRE (Java Runtime Environment).
The JDK contains everything the JRE has and more. If you're just executing Java programs, you can point to either the JRE or the JDK.
Solution 2:
Simply (change to your jdk1.x.x.x_xx)
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05
Solution 3:
My JAVA_HOME points to the JDK. If it still doesn't work, check if you downloaded ant for Java 7 and not for Java 6.
Solution 4:
Generally, it does not matter if you point it at JRE or JDK. It depends on the application which uses it. Ant documentation says you should point it at JDK to get all Ant's features.
Solution 5:
as a developer, you should point your JAVA_HOME at jdk to access javac copiler etc. It's good if you can test your program to run on the JRE though. If you are using an app server you often also need the JDK instead of the JRE but that depends on the particular server.