Whenever I get a new machine, I always end up installing Java. After the install, I like to bring up a command line and type “java -version” as a quick way to validate the installation. About half the time that does not work as I have either forgot to set my JAVA_HOME environment variable or (more likely) add “%JAVA_HOME%\bin” to my PATH environment variable.
At this point, I want to see the specific environment variables. Instead of going through Control Panel -> System -> Advanced System Settings (too many clicks) I want to just see them in my command shell.
This is documented all over the Internet, but I wanted to have this here for my own reference as it is really easy, yet I often forget it:
This will display:
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_30
Perfect! Now I can see the environment variable value.