Java, Android SDK, ADB environment variable configuration, and JDK1.7 swap JDK1.8

Source: Internet
Author: User

Recently, because the project needs to be used to change the JDK1.7 to JDK1.8, the configuration of various environment variables is clearly recorded:

All of the changes here are system variables, not user variables

Java environment variable configuration:

Variable Name variable value
Java_home D:\JDK\jdk1.8.0 (point to JDK installation path)
CLASSPATH D:\JDK\jdk1.8.0\lib (point to the Lib folder in the JDK folder)
Path D:\JDK\jdk1.8.0\bin (point to Bin folder in JDK folder)

For the first configuration, the variable name java_home, classpath need to create a new

If you add a path to the front, add a semicolon after \ bin (note the English semicolon), and append the semicolon to the last side before adding the path. In short, the path and the path should be separated by semicolons! (Win10 automatically split each path, you do not have to add a semicolon)

Verify configuration succeeded: Input Java, javac in cmd, each display a series of Help instruction prompt is configured successfully

JDK1.7 change to JDK1.8.

In addition to changing the above three paths to the respective JDK1.8 folders, it is very likely that the presence of JDK1.7 before the JDK1.8 is not used.

After reinstalling JDK1.8, open cmd input java-version, if the JDK version is displayed, the installation is successful.

I encountered an error here error:could not open D:\eclipse\lib\amd64\jvm.cfg

Workaround http://blog.csdn.net/shichg/article/details/38312505, I'm here to delete the JavaSoft folder

Then the cmd input java-version, and encountered an error

Error opening registry key ' Software\javasoft\java Runtime environment '
Error:could not find Java.dll
Error:could not find Java 2 Runtime environment '

Workaround http://blog.sina.com.cn/s/blog_90a9238f0102v4g3.html, I'm here to reinstall the JDK1.8 again


Android environment variable configuration:
Android_sdk_home D:\SDK\android-sdk (point to SDK installation path)
Path D:\sdk\android-sdk\platform-tools;d:\sdk\android-sdk\tools (point to Platform-too in the SDK folder LS and Tools folder)

Verify configuration succeeded: Enter ADB in cmd, display a series of help instruction prompts to configure success


Android ADB Port customization:

Because the ADB default ports often conflict, you can set them to other infrequently used ports, and no ADB issue will occur
android_adb_server_port7143

7143 of these can also be changed to other infrequently used ports.

Java, Android SDK, ADB environment variable configuration, and JDK1.7 Exchange JDK1.8

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.