Lesson 1: Java environment construction
Java environment construction
Java features and benefits
Three versions of Java
JDK、JRE、JVM
Install development environment
JDK download and installation
Configure environment variables
JDK directory introduction
Uninstall JDK
Jdk8 installation and environment configuration
1. Download JDK;
A. download directly from the official website: http://www.oracle.com/ ;
B. or Baidu network disk:
Link: https://pan.baidu.com/s/1S14y4_3eN9G6oOVfhmbe_w Extraction code: 0cf6
2. Double click setup,
Click next
If the installation directory is not modified, you can directly proceed to the next step
Continue to the next step and wait for the installation to complete
Installation completed.
3. After the program is installed, configure the environment variables
Java program development will use two JDK commands: javac exe、java. Exe, and the path is placed under the JDK and JRE files respectively. Since these commands do not belong to the commands of windows itself, they can be used only after path configuration.
注意:包会分开jdk和jre两次安装,不能安装在相同路径下,bin会覆盖。
A. right click computer - > properties - > advanced system settings and select "environment variables". Click new under system variables to create a new system environment variable.
B. click New: the variable name is "java_home", the variable value is "C: \ program files \ Java \ jdk1.8.0_91", and click OK to create a new one;
C. Edit - > variable name "path", add ";% java_home% \ bin;% java_home% \ JRE \ bin" at the end of the original variable value;
Complete the configuration of environment variables.
4. Use the Java command to confirm whether the environment is successfully configured
Open Win + R to run, enter CMD to open the command prompt window
Enter the Java, javac and Java - version instructions respectively to see whether the compiler information of JDK can be seen;
Java instruction:
Javac instruction:
Java - version Directive:
5. Create a HelloWorld folder on Disk C, write a "HelloWorld" applet with Notepad to verify and save it as HelloWorld java,
public class Helloworld{
public static void main(String[] args) {
System. out. println("Hello Helloworld"); } }
First enter javac HelloWorld Compile Java, and then enter Java HelloWorld to run. As shown below
So far, the installation is successful.