with old Yang Xue . Java Series (v) JDK installation and configuration
tip: This section of the content for Java is very important to get started, for just contact with the Java students must seriously study, Welcome to comment on technical issues. Other questions are not answered.
(book to Back) the last lesson we briefly introduced the Java project development process and common development tools, This lesson we explain in detail the JDK installation and Configuration. As we learned from the previous section, we know that after we have written the Java code, we need to compile the Java code before executing it. The compilation and execution of Java programs is done through the JDK. So to do Java development, First we need to learn to install and configure the JDK. Let's learn more about the installation and configuration of the Jdk.
Here we take two steps to learn about JDK installation and configuration
- Installation of the JDK
- The configuration of the Jdk.
first,The installation of the JDK
1.JDK download:
First we will download the latest version of the JDK on the official Website. Currently the latest version is JDK8; download Url: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java was migrated to Oracle's website after Oracle acquired the JDK. Specific as Follows:
differs depending on the operating system Version. Choose a different version to download on the right Download. It should be noted that as the version changes will change, if it fails, we are self-niang.
2. JDK installation:
After the JDK download is complete, we can install it. More people are using windows. So here we take the JDK installation on the Windows platform as an example to show you the JDK Installation. The Windows platform needs to be downloaded: 32-bit: jdk-8u20-windows-i586.exe 64-bit: Jdk-8u20-windows-x64.exe.
first step: after the download is complete, we double-click the download file:jdk-8u20-windows-x64.exe, start the installation, and then click Next
the Second Step: Select the installation path, you can choose your own computer software installation Directory. The premise is that the directory does not allow the presence of Chinese Characters. I chose the E://programe files/jdk8.0 directory, Click Next to start the Installation.
the third step: wait until the installation is complete the following interface, select JRE installation directory, Click Next. Starting JRE Installation
Fourth step: wait until The JRE installation finishes with the following interface, installation complete, Click close, Next we configure the environment variable
second,the JDK configuration
Beginner Java in order to better master Java. We typically use the Notepad class tool to write Java code and compile and execute the code using the JDK. The default use of JDK is Console-based. So we need to use Java commands in the console window to compile and execute the Java Program. The biggest problem with executing Java commands under the console is the path problem. Because when a command is executed under the console, the system will default to find the current path and path (system predefined environment variables), and if not, the system will prompt the command not found. This problem makes Java's compilation execution Cumbersome. So you need to configure the JDK to solve this problem.
The JDK requires two environment variables to be Configured. One is to modify the environment variable path. In order for us to use Java to compile commands Anywhere. The other is the new environment variable classpath, which is intended for Java execution to know where to look for a standard class library. After setting this variable, you can write the program without importing the standard class Library. Classpath is not required to be set after the JDK1.5 Version. But considering the compatibility issue, it is best to suggest that you set it up.
1. Configure path and classpath variable: ######
Because a command is executed, the console defaults to finding the current path and path. So we just add the JDK directory to the environment variable path. Then our Java commands can be used in any Location. The specific configuration is as Follows:
The first step: right-click My Computer and select Properties. Open the following window and select Advanced System settings:
second step: after opening the following window, Select Advanced Environment variable:
step three: After opening the following window, select System variable ->path and select Edit:
fourth step: after opening the following window, choose to edit the text, you need to note that:Win7 and previous version of this step, we ignore the line:
Fifth step: after opening the following window, modify the value of the variable, add the semicolon after the original value; The JDK installation directory is added to the Last. For example: I installed in the C drive under the input variable value: * *; C:\Java\jdk1.8.0_05\bin * * then click Ok. Configure Path Completion.
sixth step: After configuring path, Click OK to display the following window, select new, new system variable Classpath. Input variable value: * *.;D: \ Java\jdk1.8.0_05\lib\tools.jar;d:\java\jdk1.8.0_05\lib\dt.jar * * then click Ok. Configuration Classpath Complete. Note: Replace * * * * * * * D:\Java\jdk1.8.0_05 with your installation path
Ok! The content of this section is not many, but it is very important, if the content of this section is not mastered, then the contents of the later we will not Learn. So you need to practice on your own computer over and over Again.
Our entire curriculum is learned using The PnP training method teaches that we will use a complete program throughout the Course. Take the project development process as a lead in our Course. So in the next lesson we will introduce the complete project that we are going to study in this Course. Class!! ~~~
This article was posted from: le Orange Valley www.lechenggu.com
With old Yang Xue. Java series (v) JDK installation and configuration