Tag: is the item files installation path tag now configure Javac path
Download the JDK and follow the prompts to install it, and finally note the installation location where the JDK is located, assuming C:\Program Files (x86) \java\jdk1.8.0_20
- Now start configuring environment variables. Right click on "Computer", select Properties, click "Advanced System Settings", click on "Advanced", finally click "Environment variable", enter the interface to start configuration.
- Select "System Variables".
Click "New" in "System variables".
The variable name is:java_home
The variable value is:C:\Program Files (x86) \java\jdk1.8.0_20
PS: Variable value is the path to your JDK installation I'm here for C:\Program Files (x86) \java\jdk1.8.0_20
- System variable "click" New ".
The variable name is:CLASSPATH
The value of the variable is:.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; (Remember that there's a "." In the front. and a ";").
- Find "path" in the "System variables" (we just need to add one).
Be careful to backup your path before configuring this variable to prevent accidental deletion of!!!!!
What you need to add is: The JDK installation path plus "\ Bin",
Like me here is:"; C:\Program files (x86) \java\jdk1.8.0_20\bin" I'm adding it to the last side of the original, if you want to add it to the front: "C:\Program files ( x86) \java\jdk1.8.0_20\bin; "
Look closely, in fact, the position of the semicolon has changed.
After configuration, come to the cmd interface and enter "Java" and "Javac" to see if the configuration is successful!
In fact, as long as the "Java_home" and "CLASSPATH" configuration is correct, the JAVA command will succeed, if the "path" configuration has a problem, the Javac command will fail. You can also enter path to view the paths of the JDK installation to prevent it from being found.
- Absolute Path : The path to a unique file or folder, starting with a drive letter. Current path : The current path, which is an absolute path. relative path : Not from the drive letter, the target path location, is part of an absolute path, and when using relative paths, it is combined with the current path as an absolute path.
javac-d Destination Path Java file path
( you can save the. Class file to the destination path file )
Set classpath=.; Target path;%classpath%
( can be compiled at the current drive letter )
2.Java Compilation execution Process: 1. Loading bytecode files
2. Verifying byte code
3. Allocating and Managing memory
4. Translate into machine code instructions and execute
5. Garbage collection
JDK environment configuration and Java execution procedures