Java Jdk1.6.0_10
Set JAVA_HOME=c: Program Files Java jdk1.6.0_10 Change your working directory to be root source directory (i.e. The directory containing this file). Run the ant script included in the repository.
I went to the Environment Variables in 'System' in the control panel and made two new variables, one for user variables and one for system variables. Both were 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. Fronius transpocket 1400 manual. 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 How can I fix this problem?
Find JDK Installation Directory First you need to know the installation path for the Java Development Kit. Open the default installation path for the JDK: C: Program Files Java There should be a subdirectory like: C: Program Files Java jdk1.6.0_10 Note: one has only to put the path to the jdk without /bin in the end (as suggested on a lot of places). C: Java jdk1.6.0_31 and NOT C: Java jdk1.6.0_31 bin! Set the JAVA_HOME Variable Once you have the JDK installation path: • Right-click the My Computer icon on your desktop and select Properties.
• Click the Advanced tab, then click the Environment Variables button. • Under System Variables, click New. • Enter the variable name as JAVA_HOME. • Enter the variable value as the installation path for the Java Development Kit. • Click Apply Changes.
Note: You might need to restart Windows The complete article is here, on my blog:. You have to first in your system. Set Java Home JAVA_HOME = C: Program Files Java jdk1.7.0 [Location of your JDK Installation Directory] Once you have the JDK installation path: • Right-click the My Computer icon on • Select Properties. • Click the Advanced system setting tab on left side of your screen • Aadvance Popup is open. • Click on Environment Variables button. • Under System Variables, click New.
• Enter the variable name as JAVA_HOME. • Enter the variable value as the installation path for the Java Development Kit. • Click Apply Changes. Set JAVA Path under system variable PATH= C: Program Files Java jdk1.7.0; [Append Value with semi-colon]. This is for setting the Java environment from www.java.com -.
There are solutions for Windows 7, Windows Vista, Windows XP, Linux/Solaris and other shells. Example Windows 7 • Select Computer from the Start menu • Choose System Properties from the context menu • Click Advanced system settings -> Advanced tab • Click on Environment Variables, under System Variables, find PATH, and click on it. • In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value. • Reopen Command prompt window, and run your Java code.
For those who are still stumped with this problem (I tried all the above suggestions) -- If you're on a 64-bit version of Windows and you've installed the 32-bit JDK, besides adjusting PATH variables, you may need to adjust registry variables, too. I was pulling my hair out, having correctly set my PATH variables -- still to no avail -- and then only finding 'vacated' Java entries in my registry, seemingly a deadend of fixing the 'misfiring' Java Runtime Environment.
By using Process Monitor to watch the program I was trying to get started, in order to sniff out where it was looking in the registry for Java (Runtime Environment), I triumphantly discovered that it's looking in the 32-bit version of registry entries, found in HKEY_LOCAL_MACHINE SOFTWARE **Wow6432Node** JavaSoft Java Runtime Environment. Within that key, you should find subkeys of different Java versions installed (past and/or present). Click on the subkey of the latest version (my subkey is currently 1.7.0_25, for example). After clicking on that subkey, you'll see registry string values listed on the right, and particularly, JavaHome and RuntimeLib. You need to modify the values of those two values to reflect the both the current folder and jvm.dll file, respectively.