When I type in echo $JAVA_HOME, I get $JAVA_HOME instead of the location of the jdk. I set the path from the environment variables correctly:
Variable name : JAVA_HOME Variable value: C:\Program Files\Java\jdk1.7.0_25
what am I doing wrong?
The echo $JAVA_HOME command-line must return the complete path directory to java executable.
Right click My Computer and select Properties. On the Advanced tab, select Environment Variables, and then edit JAVA_HOME to point to where the JDK software is located, for example, C:\Program Files\Java\jdk1.
Verify JAVA_HOME Enter the command echo %JAVA_HOME% . This should output the path to your Java installation folder. If it doesn't, your JAVA_HOME variable was not set correctly. Please make sure you're using the correct Java installation folder, or repeat the steps above.
JAVA_HOME is an operating system (OS) environment variable which can optionally be set after either the Java Development Kit (JDK) or the Java Runtime Environment (JRE) is installed. The JAVA_HOME environment variable points to the file system location where the JDK or JRE was installed.
Try echo %JAVA_HOME%
instead of echo $JAVA_HOME
.
The first is for Windows (I'm assuming it's windows based on your filepath), the one you're using is for Linux.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With