Installing the Java Development Kit: Windows Guide作者: android 发布时间: 2017-08-09 浏览: 740 次 编辑
1. Verify That You Have Java
First, check if you have the Java Developer Kit, version 7 or greater already installed. To check if you have JDK installed (and which version), open a terminal window and type:
java -version and hit enter.
The example below shows Java version 8.0_05 -- the version number comes after the “1.”
If you have Java 7 or greater, you computer is set up!
If the JDK is not available, or the version is lower than 7, go on to Step 2 below.
2. Download the Java Development Kit
Download the Java Development Kit, aka, the JDK, from this page.
Oracle, the company that maintains Java, has a lot of options and acronyms. We're looking for the plain old JDK. This is the kit you need to start developing your apps with Java.
As of May 2015, the download icon for the JDK looked like this:
After you click the download link, you'll see a list of options for download. Go to the Java SE Development Kit menu of options. Do not go to the demos and samples (the menus look very similar, so make sure to read the heading at the top).
You've got a lot of options here, but the two you care about are the Windows options.
If your computer is only a few years old, you're most likely going to download the 64-bit option. If your computer is a little older you can follow these instructions to double check.
I'm going to download the 64-bit option (highlighted below).
Accept the license agreement, and download it. Once you've downloaded it, go ahead and double click it to install.
3. Verify That You Have Java
Go back to Step 1 and confirm that you have Java version 7 or higher installed.
Do not move on with Android Studio install until after you have installed the JDK. Without a working copy of Java, the rest of the process will not work. If you can't get the download to work, look for error messages, and try googling to find a solution.