The JDK is the Java language Software Development Toolkit for Java applications on mobile devices and embedded devices . The JDK is the core of the entire Java development, which contains Java's runtime environment,Java tools, and Java-based class libraries.
JRE(Java Runtime Environment,Javaoperating Environment), runJAVAA collection of environments that a program must have, includingJVMStandard Implementation andJavaCore Class Library.It includesJava virtual machine (JVM),JavaCore class libraries and supporting files. It does not contain development tools(JDK)-- compiler , debuggers, and other tools. If you only need to runJavaprogram orapplets, download and install it. If you want to develop your ownJavasoftware, to downloadJDK (JREand theJDKthe difference, noJDK, it cannot be compiled.Javaprogram, if you want to run onlyJavaprogram, make sure that you have installed the appropriateJRE). In theJDKis included in theJRE. SE (J2SE),Standard Edition, the Standard Edition, is a version we usually use. ee (Java),Enterprise Edition, Enterprise Edition, using thisJDKDevelopmentJavaapplication. ME (J2ME),Micro Edition, mainly used in mobile devices, embedded devicesJavaApplication
First, JDK download
Official website: http://www.oracle.com/technetwork/java/javase/downloads/
After entering the official website, the download interface is as follows:
Click on the JDK download to enter the detailed download page as follows: Accepet License Agreement Hook, the system is 32-bit select Windowsx86. system 64 for the two can be selected, recommended windowsx61.
After the download, it is a fool-like installation, has been the next step.
Remember the following installation path, which you will use later to configure the environment variables.
Second, the environment variable configuration:
In order to facilitate the development of Java programs, you need to configure the environment variables, right-click My Computer---Properties----environment variable-----User variables in the [New (N)] Add the following environment variables
1. Configure Java_home
New Java_home
Variable name Java_home
Variable value C:\Program files\java\jdk1.8.0_131 your JDK installation address
2. Configure Path
Variable name Path
Variable value%java_home%\bin;
3. Configure Classpath
New Calsspath
Variable name CLASSPATH
The value of the variable.; %java_home%\lib\dt.jar;%java_home%\lib\tools.jar; (Note the front ".;" Because Windows default search order is to search the current directory, then search the system directory, and then search the PATH environment variable set )
4. Test whether the configuration is successful
Window+r Open cmd Window input javac appears as follows to configure success
Third, write the first Java program
1. Create a file with a. java suffix in a directory
2. Write the test code inside:
public class test{public static void Main (String args[]) { System.out.println ("Hello java!");} }
3. Open the cmd command line in the Test.java directory
Press and hold shift+ right-click
4. Compiling the program
Javac Test.java
Generate Java.class
5. Running the program
Java Test
In this way, the Java environment is built.
JDK installation, Java environment configuration