If you do not have the newest JDK already put in in your pc, comply with the steps under. You have to have the JDK put in to run applications.
To see which version of the JDK you’ve got put in, if any, type
javac -version in a terminal window.
$ javac -version
You can see what the newest version of the JDK is on the Java SE Downloads web page. If you’ve got the newest version, skip forward to Install IntelliJ IDEA.
Note: We advocate that you just set up only the newest JDK and JRE.
JRE or JDK? The JRE (Java Runtime Environment) is required for running Java and Kotlin packages. The JDK (Java Development Kit), alternatively, contains the JRE, plus the event instruments that you just want for writing and working Java packages. You want the JDK for writing Kotlin packages.
Step 1: Remove any older versions of the JDK/JRE
Before you put in the newest and best, take away all older variations of the JDK:
- For Windows, choose Control Panel > Add/Remove Programs.
- For Mac directions, see Uninstalling the JDK.
Step 2: Download the JDK
You can download the JDK free of charge right here:
- Click on JDK Download.
- Under Downloads, select the hyperlink for the JDK to your operating system.
- Accept the license agreement.
- Click on the Download button.
Step 3: Install the JDK (for Mac)
From both the Downloads window of the browser, or from the file browser, double-click the
.dmg file to launch the install file.
- A Finder window seems with an icon of an open field and the title of the
- Double-click the package deal icon to launch the installation app, and comply with the prompts as they appear.
- You would possibly need to enter the administrator password to continue.
- After the installation is complete, feel free to delete the
.dmgfile to avoid wasting space.
Step 3: Install the JDK and JRE (for Windows)
- Run the downloaded installer (for example,
jdk-14.0.1_windows-x64_bin.exe), which installs each the JDK and the JRE. By default, the JDK is installed within the
C:\Program Files\Java\jdk-14.0.1listing, nevertheless it is determined by the newest model.
- Accept the defaults, and comply with the on-screen directions to put in the JDK.
Step 4: Add the JDK set up directory to PATH (Windows only)
Windows searches the current directory and the directories listed within the
PATH environment variable (system variable) for executable programs.
- In Settings for Windows, search for
edit environmentin Find a setting.
- Select Edit environment variables to your account within the record of matches.
- In the Environment Variables dialog within the User variables part, choose Path and click on the Edit… button.
- Add the path to the JDK’s bin directory, for example,
C:\Program Files\Java\jdk-14.0.1\bin, after any existing items.
Note: This was examined for JDK 14 put in on Windows 10. Other versions of the JDK might use totally different directories, and the steps could also be totally different for different variations of Windows.
Step 5: Verify the JDK installation
To confirm that the JDK was installed appropriately, sort the next instructions in a terminal window:
java -version javac -version