This may be self evident to power Java programmers, but may not be so for those who are just starting the Java journey.
After downloading JDK from Sun and installing it on Windows, what environment variables should one set to use javac etc.. from command line tools like vi? (see Programming Java with Vim) Also, how does one set environment variables on Windows?
See How to set the path in Windows 2000 / Windows XP for changing environment variables on Windows.
I suggest adding a systems variable called JAVA_HOME and set that to
or wherever the installer installed Java.
Then add
at the end of
PATHvariable. Note the semicolon is not a typo.Another important environment variable that may come in handy later is
CLASSPATH. For now, this does not need to be set, but nice to keep it in mind.