JDK installation -JAVA

Download JDK

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

About Version Select problems that need attention:

  • If the installation is 32 eclipse, the JDK should be installed Windows x86 (32-bit); If the installation is 64 eclipse, the JDK should install Windows x64 (64 bit). Otherwise it will pop up when you start Eclipse "Failed to load the JNI shared library jvm.dll" Error!
  • So JDK (1.6,1.7,1.8) which one would it? If you need to build Android environment, then, and version of the SDK package is relatively high, such as Android 5.0 (android-21), Android 5.1 (android-22), it is recommended that you install 1.7 and later, or newspaper "Parsing Data for android-XX failed Unsupported major.minor version 51.0" error. Reference Address: http://code2care.org/pages/parsing-data-for-android-21-failed-unsupported-major.minor-version-51.0/

installation

Duang! Installation horse of God, the most simple! ! Next, next, next ... on the right! ! haha ~~~

Environment variable configuration

  • JAVA_HOME

  • Path

"% JAVA_HOME% \ bin" path is increased, a plurality of directories separated by semicolons (dos execution command, the system looks for the command corresponding to the executable file in the path specified)

  • classpath

JDK5.0以上版本,可以不对其进行配置。如果非要设置,硬是要设置,一定要设置那看下面:
classpath为java加载类(class or lib)路径,只有类在classpath中,java命令才能识别,设为: .;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar (要加.表示当前路径) %JAVA_HOME%就是引用前面指定的JAVA_HOME;

检验安装配置是否正确

Windows+R后输入cmd回车。

输入java -version后回车,出现如下画面则成功!

Guess you like

Origin www.cnblogs.com/sunshiwei/p/11235712.html