JDK is the core of the entire Java, including the Java Runtime Environment (Java Runtime Envirnment), a bunch of Java tools and the basic Java class library (rt.jar). No matter what Java application server is, it essentially has a certain version of JDK built-in. Therefore, mastering JDK is the first step to learn Java well. The most mainstream JDK is the JDK released by Sun. In addition to Sun, there are many companies and organizations that have developed their own JDK, such as JDK developed by IBM, Jrocket by BEA, and JDK developed by the GNU organization, etc. . Among them, the JVM (Java Virtual Machine) included in IBM's JDK runs much more efficiently than the JVM included in Sun JDK. Jrocket, which specifically runs on the x86 platform, is much more efficient on the server side than Sun JDK. But no matter what, we still need to master Sun JDK first.
1. Download and installation of JDK
1), JDK is also called J2SE (Java2 SDK Standard Edition), which can be downloaded from Sun's Java website. Download A good JDK is an executable installer (foolproof installation).
2), after the default installation is completed, a set of JRE (for browser use) will be installed in the C:/Program Files/Java/ directory, in C:/ Install a set of JDK (also including a set of JRE) under j2sdk1.4.2. Then we add environment variables: PATH (C:\Program Files (x86)\Java\jdk1.7.0_01\bin), CLASSPATH (.) and JAVA_HOME (not necessary, mainly used for the use of tomcat in the web stage. C:\Program Files (x86)\Java\jdk1.7.0_01).
#3) After the environment variables are configured, we need to search for cmd in the start menu and run it.
Enter Java in the black window and press Enter. When this appears, the JDK is installed.
2. JDK command tool
The most important command line tool of JDK:
java: Start JVM to execute class (Java package name. Class name)
javac: Java compiler (java -d. Class name.java)
javadoc: Java document generator (javadoc -d doc file name)
You must be very, very familiar with these command lines and be proficient in each parameter. For learning these commands, there are detailed documents on the JDK Documentation.
3. Uninstalling JDK
Taking win7 as an example, after installing Java jdk, there will be two programs that need to be completely uninstalled. Control Panel-->Uninstall a program-->Programs and Features:
java 7 update
Java(TM) SE Development Kit7
right click, delete OK!
The above is the content of JDK (Java Development Kit), the JAVA development tool. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!