A very small problem was raised here. I heard a very serious problem when I attended the training on Chuanzhi podcast. A girl has been studying Java for a month, and cannot even configure an environment variable! I was surprised to hear that. What is this? After learning how to configure environment variables for a month, I cannot configure any environment variables! You have to ask yourself if you want to configure it. Fortunately, I will configure it! In fact, it is really easy to configure an environment variable, mainly the configuration of the path and classpath variables. I will not talk about it here. I want to talk about another question. What are the roles of these two environment variables? I would like to share with you the following:
Path
Environment variable: Specifies the command search path.
DoS
Enter
Javac
When the program is compiled, it will
Path
Find the corresponding command program in the specified path. Set
JDK
Under the installation directory
Bin
Add directory
Path
In environment variables,
Bin
Contains commonly used executable files
Java
,
Javac
,
Javadoc
After setting, you can execute
Java
,
Javac
And so on.
Casspath
Environment variable: used to specify the search path of the class.
Java
Class, you must first find them
Java
Virtual Machine (
JVM
) Is through
Classpath
Environment variables to find the class, we need
JDK
Subdirectory under the directory
Lib
Directory
Rt. Jar
Set
Classpath
Note: The Current Directory
"."
Also add to this directory