-----------Android Training, Java training, Java Learning Technology blog, look forward to communicating with you! ------------
The setting of environment variables may be considered by many as not a problem. But when I first touched the Java program, thinking about programming, as long as you can run the code is OK, what do you care. Also do not know how to set up, can run the DOS window is OK, so has always been to this problem is ambiguous. But this problem is like a fishbone, stuck in my throat, although it will not have any impact on programming, but always uncomfortable. So today took time to look back to see the video, coupled with their own experiments several times, finally to understand the problem.
The purpose of setting the PATH environment variable is in order to enter Javac, Java and other statements in the DOS window, where we want the system to look for Java.exe, javac.exe the two execution files. The Java.exe, Javac.exe
When the directory is added to the PATH environment variable, we can downgrade the Java.exe and Javac.exe in any directory because the system knows where they are. The advantage of this is that we do not have to call these two files in the directory where the Java.exe and Javac.exe are located.
The purpose of setting up classpath is to tell the JVM (virtual machine) where to look for ". Class" files.
Having doubts, and then finding a solution yourself is cool.
Dark Horse Programmer--java Foundation-environment variable setting