Setting JAVA_HOME in Windows?
JDK stands for Java Development Kit, while JRE stands for Java Runtime Environment. JAVA_HOME should point to a JDK not a JRE as the JDK is used for development purposes. JDK includes the compiler and other tools needed to develop Java applications while JRE does not.
See How to set java_home on Windows 7? on how to change your JAVA_HOME.
Source:
Java SE 6 vs. JRE 1.6 vs. JDK 1.6 - What do these mean?
setting JAVA_HOME in windows 7
Set JAVA_HOME to C:\mypath\Java\jdk1.7.0_17\
Then in your path variable add %JAVA_HOME%\bin
Setting JAVA_HOME
As many have mentioned I had to add...
C:\Program Files\Java\jdk_version\bin
...to the path variable.
However what was not mentioned and was stopping this from working was that I had to make sure
java\bin directory is in the path statement before the windows\system32 directory, otherwise this will not work.
I was able to find the information here.
setting up environment variables in windows 7 for java and ant
you can try the following:
SET ANT_HOME=my_path_to_ant_folder
SET JAVA_HOME=my_path_to_jdk_folder
SET PATH=%PATH%;%ANT_HOME%/bin;%JAVA_HOME%\bin;
Related Topics
Update Eclipse With Android Development Tools V. 23
Read/Write String From/To a File in Android
Virtual Memory Usage from Java Under Linux, Too Much Memory Used
"No X11 Display Variable" - What Does It Mean
Launching Google Maps Directions Via an Intent on Android
Android Update 17 Seems Incompatible With External Jars
How to Parse Json Array (Not Json Object) in Android
Java.Text.Parseexception: Unparseable Date: Java.Text.Dateformat.Parse(Dateformat.Java:579)
After Google Play Service Update to Version 13 I Got an Error
How to Return a Boolean from Asynctask
Android: How to Use Alarmmanager
Sqlite Getting Nearest Locations (With Latitude and Longitude)
How to Implement Custom Action Bar With Custom Buttons in Android
Correct Way to Add External Jars (Lib/*.Jar) to an Intellij Idea Project
How to Generate an Md5 Hash in Java
How to Set Environment Variables from Java
"Non-Static Method Cannot Be Referenced from a Static Context" Error