JDK: Java Development Kit
JRE: Java Runtime Enviroment
JVM: JAVA Virtual Machine (JAVA virtual machine) write once, run anywhere
JDK includes JRE
1. Baidu search JDK8 (used by enterprises) and
click to enter
2. Select the appropriate version to download and
require registration One Oracle account can be downloaded
Download and open
3. Install JDK,
change the installation path and remember the path name.
Installation is complete
. 4. Configure environment variables
1)
My Computer -> Right-click -> Properties -> Advanced System Settings -> Environment Variables
Create a new JAVA_HOME
variable value in the system variable as the JDK path
2)
Configure the path variable
Click New and enter %JAVA_HOME%\bin and %JAVA_HOME%\jre\bin
5. Check whether the installation is successful.
Open cmd and enter JAVA -version, which means
the installation is successful
. 6. Write the first java code
1) Create a
new folder Create a new text file and change the extension to .java ( first letter capitalized )
2) Use notepad ++ open and write down the life of a java code ( the java case-sensitive ) ( file name and class name to phase the same)
3) locate the file location and enter cmd + space + Enter the path in front of
4) compile javac java file
will Generate a class file
5) Run the class file