JDK download and installation instructions for download and installation tutorial JDK

JDK download and install tutorial

1.JDK Download:
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Point to open the link you should see the screen shown below:
Write pictures described here
2. Click on the image above where the arrow will appear below the interface, then you need to select the corresponding version according to your computer system, and select the version before you need to download the receiving protocol specific interface is shown below:
Write pictures described here

3. Double-click the JDK performed after installation (FIG remember modified according to the second web path about the installation, do anything to the system disk are installed ...):
(1) Double-click the installation is shown as follows:
Write pictures described here
Write pictures described here
Write pictures described here
Write pictures described here
Write pictures described here
4. After installation, the need for an environment variable, right my computer - properties ---- advanced system settings you will see the following screen:
Write pictures described here
5. click the image above environment variables, and then start the configuration environment variables:
(1) click system New button below the variable, the variable name JAVA_HOME (on behalf of your JDK installation path), the value corresponds to the installation path of your JDK.
Write pictures described here
(2) continues to create a CLASSPATH variable to variables in the system, have their values as shown below:
Write pictures described here
note here: top a small dot in the English state. . . . Many beginners when configuring environment variable will fall in the pit.
(3) Find a variable name in your system PATH variable which is variable is necessary to add the following paragraph of the code in its range inside:

%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;

   
   
   
   
  • 1

此时你应该在你原有的值域后面追加,记得在原有的值域后面记得添加一个英文状态下的分号。
最后点击确定,此时JDK的环境变量配置就完成了。
6.测试自己所配置的环境变量是否正确
(1)WINDOWS+R键,输入cmd,进入命令行界面,如下所示:
Write pictures described here
(2)输入java -version命令,可以出现如下图的提示,你可以看你安装的JDK版本。
Write pictures described here
(3)输入javac命令可以出现如下的提示:
Write pictures described here
(4)输入java命令就会出现如下图所示的结果
Write pictures described here
7.写一段代码可以验证一下
(1)我在E盘新建了一个文件夹叫javafile,在里面有一个Java文件,名字叫TestJava.java,此时需要注意,你的文件名字后缀一定是.java
(2)你需要在你的文件里面写下面的代码:

public class TestJava{
public static void main(String[] args){
	System.out.println("I am a  java new learner!");
}

}

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

The results (3) Continue windows + r to enter the dos command line, you need to enter the directory you java file is located, and then were using the javac command your java files are compiled, and then use the java command to resolve your javac command to compile the , as this will be shown below:
Write pictures described here
here we must note: You must enter the file's directory; secondly the use of the name behind the javac command file must follow the file extension of .java; .java suffix when using the java command can not write .
When you are finished execute javac command if no error, illustrated by the compiler, it will generate a .class file of the same name in your file directory.
Write pictures described here
If you have completed all of the above, and the results are displayed correctly, then state your JDK installation and environment configuration are successful, then you can start your JAVA study.
JDK1.8 API link:
http://docs.oracle.com/javase/8/docs/api/
JAVA tutorials:
http://docs.oracle.com/javase/tutorial/

Here Insert Picture Description

      </div>
      <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-e44c3c0e64.css" rel="stylesheet">
              </div>

Guess you like

Origin blog.csdn.net/YiJianCaoTang/article/details/93360339