In this post, I’ll show how to setup Java JDK version 11 on Windows 10. Java 8 is the most widely used today, but it is better to target Java 11 for development as it is production-ready and has long-time support.
Java 11 is currently released as Long Term Support (LTS) and a recommended version for development.
You can download Java JDK 11 from here. Don’t forget to press the Accept License Agreement.
After the download has finished just run the .exe file and click next till the end. You should find now the JDK installation to a path like this: C:\Program Files\Java\jdk-11.0.3.
Setting the PATH
- The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window.
- The PATH system variable can be set using System Utility in control panel on Windows, or in your shell’s startup file on Linux and Solaris.
- Press Windows key + Q -> in the search bar type env.
- Click Environment Variables. In the section System Variables
New, add to Variable name -> JAVA_HOME and to Variable value -> C:\Program Files\Java\jdk-11.0.3 (in my case the jdk version is 11.0.2)
- Then find the
PATHenvironment variable and select it. Click Edit. If the
PATHenvironment variable does not exist, click
Newand create it yourself.
Newand add %JAVA_HOME%\bin then press OK.
- Now open a new Command prompt window, and run the java -version command. You should see an output like this:
In this article we’ve seen how to install and setup the Java Development Kit (JDK), one of the core technologies of Java programming.
That’s it, in case you have any question don’t esitate to post it on the comment section bellow.
If this post was helpful in any way, a share or a like would be very much appreaciated.
Thanks and happy coding.