How to set java_home on Windows 7?

Posted by Derek on Stack Overflow See other posts from Stack Overflow or by Derek
Published on 2010-04-12T02:37:40Z Indexed on 2010/04/12 2:43 UTC
Read the original article Hit count: 2073

I went to the Environment Variables in 'System' in the control panel and made 2 new variables. one for user variables and one for system variables, both named JAVA_HOME and both pointing to

C:\Sun\SDK\jdk\bin

but for some reason, I still get the below error when running a java command...

BUILD FAILED
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:161: The following error  occurred while executing this line:
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:141: The following error occurred while executing this line:
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish\setup.xml:137: Please set java.home to a JDK installation

Total time: 1 second
C:\Users\Derek\Desktop\eclipse\eclipse\glassfish>lib\ant\bin\ant -f setup.xml
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\lib\tools.jar
Buildfile: setup.xml

© Stack Overflow or respective owner

Related posts about windows-7

Related posts about java-ee