Before you can create and modify Java programs, you’ll need the Java Software Development Kit. You can download the kit (also known as Java SDK or JDK) for free from Oracle as a single installer file, which makes installation quick and easy. Learn the best way to download and install the Java Software Development Kit on your Windows, macOS, or Linux system.
Steps
Part 1
Downloading the Java Software Development Kit
Google images Step 1 Navigate to https://www.oracle.com/technetwork/java/javase/downloads/index.html....Navigate to https://www.oracle.com/technetwork/java/javase/downloads/index.html. You can download a simple Java Software Development Kit (JDK) installer for Windows, macOS, or Linux directly from Oracle.
Google images Step 2 Click the Download button beneath “JDK.”Click the Download button beneath “JDK.” This will open a new page containing several download options.
Google images Step 3 Scroll to the latest version of Java SE Development Kit.Scroll to the latest version of Java SE Development Kit. You should always use the latest stable version of the toolkit. There may be more than one version listed, so look closely at the release number.
For example, if you are presented with JDK 8u101 and 8u102, choose 8u102.
Google images How to Install the Java Software Development KitClick the radio button next to "Accept License Agreement.” Before you can click the download link, you must accept the license agreement. The option is just beneath the JDK version number.
Google images Step 5 Sign in or register a new account.Sign in or register a new account. Before you can download the file, you must sign in an Oracle account. If you already have a account with Oracle, sign in with the email address and username associated with your account. If you do not have account, click Create account and fill out the form to create an account.
Google images Step 6 Click the download link for your operating system.Click the download link for your operating system. You can download Java SE JDK for Windows, macOS, or Linux. Once you click the link, follow the prompts to select a save location on your computer and start the download.
Part 2
Installing on Windows
Google images Step 1 Double-click the JDK installer file.Double-click the JDK installer file. Once you’ve downloaded the Java Software Development Kit installer, navigate to the download location you chose earlier to launch the installer. By default, downloaded files can be found in your Downloads folder. You can also open the file from within your web browser.
The file name for the Java Software Development Kit installer is "dk-13.0.2_windows-x64_bin.exe" or "jdk-13.0.2_windows-x64_bin.zip". If you download the ZIP file, you will need to extract the contents of the zip file.
Google images Step 2 Allow the app to make changes to your computer.Allow the app to make changes to your computer. Depending on your version of Windows, you may be prompted to give permission for JDK to install. Click “Yes” or “OK” when prompted, and the installer’s Welcome screen will appear.
Google images Step 3 Click Next to continue.Click Next to continue. Now you’ll move through a series of screens that will guide you through the JDK installation.
Google images Step 4 Click Next to accept the default installation settings.Click Next to accept the default installation settings. This will begin the installation, which may take a few minutes depending on your computer. The green progress bar will show the progress of the installation.
Google images Step 5 Click Close when the installation is complete.Click Close when the installation is complete. This button will not appear until the installer has finished.
Google images Step 6 Open the Windows Advanced System Settings in the Control Panel.Open the Windows Advanced System Settings in the Control Panel. Use the following steps to navigate to the Advanced System Settings in the Control Panel:
Click the Windows Start menu and type Control Panel.
Click the Control Panel.
Click System and Security.
Click System.
Click Advanced System Settings in the panel to the left.
Google images Step 7 Navigate to the Advanced tab.Navigate to the Advanced tab. You’ll see a few different areas where you can adjust various system settings.
Google images Step 8 Click the Environment Variables button.Click the Environment Variables button. This new dialog box displays two separate areas—one for User Variables (settings specific to your user account) and another for system-wide settings (System Variables).
Google images Step 9 Double-click the Path variable under “System Variables.”Double-click the Path variable under “System Variables.” Now you’ll add a new variable. Follow these instructions exactly, as there is no “undo” option.
Google images Step 10 Edit the environment variables (Windows 10 only).Edit the environment variables (Windows 10 only). This step only applies to Windows 10. Use the following steps to edit the environment variables:
Click New
Type c:Program FilesJavajdk1.8.0_xxbin (but replace the “8.0_xx” part with the version number you installed).
Click the Move Up button until the path you typed appears at the top of the list.
Click OK.
Google images Step 11 Set the variable (Older versions of Windows only).Set the variable (Older versions of Windows only). Skip this step if you’re using Windows 10. You should see the “Edit System Variable” window. Make the following changes to the “Variable value” field only (don’t delete what’s there though):
Type C:Program FilesJavajdk1.8.0_xxbin (but replace the “8.0_xx” with the correct version number) in FRONT of the other directories.
Add a semicolon (;) to the very end of what you just typed, just like this: C:Program FilesJavajdk1.8.0_xxbin;
There should be no space before or after the semicolon, so the entire line should look something like this: C:Program FilesJavajdk1.8.0_2bin;C:Program FilesIntelxxx
Click OK.
Click OK until you’ve closed all open windows.
Google images Step 12 Open the Command Prompt icon.Open the Command Prompt Google images Windows cmd. Use the following steps to open the Command Prompt:
Right-click the windows start menu and type cmd.
Click the Command Prompt icon.
Google images Step 13 Type path and press ↵ Enter.Type path and press ↵ Enter. You should see the full path to the JDK that you entered earlier.
Google images Step 14 Type java –version and press ↵ Enter.Type java –version and press ↵ Enter. The version of JDK you installed will now appear on the screen.
If either part of this command-prompt test does not produce results, you may need to load the new environment variables by rebooting the computer.
Part 3
Installing on macOS
Google images Step 1 Double-click the installer file you downloaded.Double-click the installer file you downloaded. After downloading the Java Software Development Kit installer, double-click the downloaded file in the Downloads window of your web browser or in Finder.