Как найти jdk на windows 10

#База знаний


  • 0

Начинаем разрабатывать на Java: где взять, как установить и настроить всё, что нужно.

 vlada_maestro / shutterstock

Пишет на Java. Верит в Agile. Пьёт много кофе и не любит грязный код.

Чтобы начать программировать на Java, нужно установить комплект разработчика приложений (SDK). Он позволит запускать, отлаживать и исполнять наши первые программы. Также нам понадобится среда разработки (IDE), где мы и будем писать код.

Пройдём через это вместе. Установим JDK в Windows, Ubuntu и macOS, и IntelliJ IDEA тоже в Windows, Ubuntu и macOS. Поехали!

Java Development Kit (JDK) — это комплект ПО для разработчиков приложений на Java. Стандартная установка включает в себя интерпретатор, облегчённый интерпретатор JRE, компилятор, библиотеку Java-классов, отладчик, средства архивации и сжатия jar и другое.

Чтобы установить JDK в Windows, нужно:

  • загрузить актуальную версию пакета,
  • установить его,
  • настроить переменные окружения.

Нам нужна бесплатная версия — AdoptOpenJDK (она есть под Windows, macOS, Ubuntu и другие платформы).

Идём сюда и выбираем версию JDK (актуальны версии 8+), виртуальную Java-машину (JVM) и свою платформу.

Я выбрал OpenJDK 11 (LTS), HotSpot и Windows x64 jdk соответственно:

Скачиваем файл по появившейся ссылке (я выделил её жёлтым на скрине выше).

Извлекаем скачанный архив в папку C:\Program Files\Java\

При этом будет создана подпапка jdk-*номер версии*, а внутри неё появится папка bin.

В результате полный путь до папки bin у меня выглядит так:

C:\Program Files\Java\jdk-11.0.2\bin

Нам нужно создать системную переменную JAVA_HOME, которая будет хранить путь до нашей версии JDK. Это понадобится программам для работы с проектами Java.

Заходим в Панель управления → Система → Дополнительные параметры системы → Дополнительно

А можно и прямо в Панели управления вбить в поиск слово «переменных» (без кавычек). ОС предложит варианты, из которых выбирайте «Изменение системных переменных среды».

У вас откроется окно:

Здесь жмём на кнопку «Переменные среды».

В новом окне для раздела «Системные переменные» кликаем «Создать». В «Имя переменной» вводим JAVA_HOME (именно так, латиницей в верхнем регистре), а в поле «Значение переменной» подставляем наш путь C:\Program Files\Java\jdk-*номер версии*:

Далее в разделе «Переменные среды» редактируем системную переменную Path. Нужно добавить в неё путь к папке с исполняемыми файлами Java, а именно: %JAVA_HOME%\bin (соблюдайте регистр символов):

Перезагружаем Windows.

Запускаем Командную строку Windows. Для этого нажимаем Win + R, а в появившемся окне вводим cmd.exe и жмём на Enter.

В открывшейся консоли набираем javac -version и жмём ввод.

Если установка прошла успешно, то ответ покажет версию вашего компилятора:

Рассмотрим установку JDK на одном из самых популярных дистрибутивов Linux — Ubuntu 20.04 (LTS).

Проще всего установить версию, которая входит в пакет Ubuntu. По умолчанию в Ubuntu 20.04 входит версия Open JDK 11.

Открываем терминал сочетанием клавиш Ctrl + Alt + T и обновляем базу данных пакетов с помощью APT:

Проверяем ранее установленные версии командой:

Если установка уже выполнялась, то мы увидим что-то такое:

Для запуска любых приложений Java нужна JRE (Java Runtime Environment — среда выполнения для языка Java). Но для компиляции и разработки программ требуется JDK (Java Development Kit).

Чтобы установить JRE, вводим в консоль:

$ sudo apt install default-jre

Для установки JDK — команду:

$ sudo apt install default-jdk

Вводим команду:

Ответ должен выглядеть примерно так:

Этот способ установки использует HomeBrew (менеджер недостающих пакетов для macOS).

Прежде всего нужно добавить репозиторий в HomeBrew. Для этого открываем терминал (Cmd + N) и вводим:

$ brew tap AdoptOpenJDK/openjdk

Устанавливаем OpenJDK 11 командой:

$ brew cask install adoptopenjdk11

Вводим:

Ответ должен выглядеть примерно так:

openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.2+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.2+9, mixed mode)

IntelliJ IDEA — это интегрированная среда разработки (IDE), то есть система программных средств для создания проектов на разных языках программирования.

Сегодня это самая популярная IDE для языка Java. А ещё есть Eclipse, NetBeans и немало других, но мы рекомендуем именно IDEA, потому что даже её бесплатная версия обладает широкой функциональностью, подходит для профессиональной разработки и вообще делает Java проще в использовании.

В IDE обязательно входят:

  • текстовый редактор для написания кода (он знает синтаксис нужных языков);
  • компилятор;
  • отладчик.

IntelliJ IDEA доступна в бесплатной (Community) и платной (Ultimate) версиях. Чем они различаются, видно на скрине ниже:

Пока что нам хватит возможностей бесплатной версии.

На заметку: IntelliJ предлагает студентам и преподавателям свободный доступ к своим продуктам.

Заходим сюда и качаем версию для Windows.

Запускаем скачанный файл .exe:

Жмём Next (Далее) и выбираем путь для установки:

Снова Next, и настраиваем параметры установки:

В общем случае это:

  • 64-bit launcher — для запуска 64-разрядной версии приложения (будет создан ярлык на рабочем столе);
  • Add ”Open Folder as Project“» — позволяет открывать папки с исходниками как проекты прямо через контекстное меню;
  • .java — файлы такого типа (с таким расширением) будет открывать IDEA (по умолчанию и через контекстное меню).

Кликаем Next (Далее) и выбираем папку для ярлыков IDEA (оставляем по умолчанию):

Нажимаем Install (Установить), после чего стартует установка:

Дожидаемся её окончания и жмём Finish (Завершить):

При первом запуске принимаем пользовательское соглашение и нажимаем Continue (Продолжить):

Далее выбираем тему оформления (доступны тёмная и светлая):

Жмём Next: Default plugins и переходим к выбору устанавливаемых плагинов:

Если не знаете, что вам точно пригодится, — оставляйте всё как есть. А если, например, с Андроидом вам не работать — выключите соответствующий пункт.

Не волнуйтесь, если надобавляете лишнего или о чём-то забудете. Всё можно будет переиграть — в настройках среды.

После чего нажмите на кнопку Next: featured plugins и выберите другие нужные плагины (или оставляйте всё по умолчанию):

И наконец, нажимаем Start using IntelliJ IDEA.

Вас встретит начальный экран среды разработки (Welcome screen). Здесь можно создать новый проект, открыть или импортировать существующий, а также скачать проект из системы контроля версий:

Если вы видите такой же экран — поздравляю, установка и настройка прошли успешно! Приятного обучения!

Здесь всё даже легче, чем в Windows. Для начала качаем версию для macOS отсюда (о различии между редакциями Community и Ultimate читайте выше — в пункте про установку на Windows):

Открываем скачанный файл .dmg:

Копируем файл в «Программы»:

Читаем предупреждение ОС и жмём «Открыть»:

Принимаем пользовательское соглашение и жмём кнопку Continue (Продолжить):

Теперь приложением можно пользоваться. Приятного обучения!

Для установки IntelliJ IDEA открываем Центр приложений Ubuntu:

Вводим в поиск слово «Intellij» (без кавычек). Нам нужна IDEA Community (о различии между редакциями Community и Ultimate читайте выше — в пункте про установку на Windows):

Выбираем версию и нажимаем кнопку Install (Установить):

После установки видим IDEA в меню программ:

Запускаем, принимаем пользовательское соглашение и нажимаем кнопку Continue (Продолжить):

Вы увидите экран загрузки:

Далее вас встретит начальный экран (Welcome screen). Здесь можно создать новый проект, открыть или импортировать существующий, а также скачать проект из системы контроля версий.

Если вы видите такой же экран — поздравляю, установка и настройка прошли успешно! Приятного обучения!

Курс с трудоустройством: «Профессия Java-разработчик»
Узнать о курсе

КУРС

DATA SCIENCE ACADEMY

Научитесь использовать инструменты анализа данных, включая языки программирования и средства визуализации.

Установка JDK на рабочий или домашний компьютер нужна для компиляции текстовой информации в команды, «понятные» для системы и запуска этих команд. Например, Вы разработчик приложения или его части и хотите, чтобы программа сделала определённое действие. Для этого вам нужно войти в командную строку Windows, Linux или другой системы и ввести часть командного кода, затем запустить его исполнение.

Но что если таких команд 10 или более, и все они требуют поэтапного запуска? На выручку придёт Java Development Kit (готовый комплект разработчика приложений), так как все среды разработки приложений, написанные на языке Java «понимают» язык компилятора JDK. Распространяется комплект абсолютно бесплатно компанией Oracle Corporation, поэтому его можно скачать в любой момент.
 В нашей статье мы разберём, где скачать JDK, как установить на различные системы, что входит в комплект.

Что такое JDK

Средства разработки «Java» используют 3 основные технологии, которые позволяют пользователям писать, дорабатывать и запускать приложения:

  • JDK (Java Development Kit) – для создания приложений;
  • JVM (Java Virtual Machine) – виртуальная машина для запуска приложений;
  • JRE (Java Runtime Environment) – платформа для исполнения приложений и JVM.

Вам необходимо скачать JDK, если вы собираетесь работать в таких Java-средах как:

  • Sun Java Studio Creator;
  • NetBeans IDE;
  • IntelliJ IDEA;
  • Borland JBuilder;
  • JDeveloper;
  • Eclipse и других.

Иногда для корректной работы среды требуется предварительная установка Java JDK, иначе среда разработчика просто не запустится или не сможет корректно взаимодействовать с системой. Хорошо, если в комплекте установки уже есть подходящая версия, но иногда пользователь должен сам установить JDK, а уже затем среду для разработки ПО.

Какие версии JDK доступны

В данный момент официально доступны все, но некоторые из них не имеют долгосрочной поддержки (LTS). Версии с Long Time Support (LTS) считаются более надёжными, стабильными и функциональными, ведь при их разработке авторы опасаются вводить непроверенные новшества, что гарантирует более длительную работу без сбоев среды или ПО.

В данный момент разработчики могут скачать и использовать версии JDK с 7 по 20, есть ранний доступ к 21-й с открытым исходным кодом. Но многие компании до сих пор используют версии 8-13, хотя это и даёт им меньше возможностей.

Компания Oracle пообещала «наладить» выпуск новых модификаций с частотой в каждые 6 месяцев. Поэтому, если вам интересно регулярное обновление библиотек, фреймворков и инструментов, то следите за новостями Java. Например, 20-я версия была запущена в марте 2023 года, но уже в сентябре можно будет попробовать 21-ю, если вы не готовы использовать ранний доступ уже сейчас.

Какая версия подходит для конкретной операционной системы

Подобрать подходящий для скачивания файл вам поможет конфигурация вашей операционной системы. Посмотреть её можно, нажав правой кнопкой мыши на «Мой компьютер» и выбрав пункт «Свойства»:

  • если у вас 64-разрядная ОС, то версии 20 и предыдущие, вплоть до 7-8, будут чувствовать себя вполне комфортно;
  • если 32-разрядная, то придётся использовать 12 и ниже.

Подготовка к установке JDK
 Никаких особых настроек и параметров программное обеспечение не требует, главное найти, где скачать Java Development Kit нужной версии. Сделать это можно отсюда:https://jdk.java.net/21/ или с официальной страницы разработчикаhttps://www.oracle.com/java/technologies/downloads/archive/. Хотя существует много разработчиков JDK, и вы можете попробовать найти что-то другое.

Статья написана в рамках курса Data Science Academy
Получите 3-х дневный бесплатный демо-период

Установка JDK на Linux

Иногда установки JDK на Linux даже не требуется, так как в некоторых версиях он уже предустановлен. Чтобы это проверить введите команду:

  • «sudo update-alternatives –config java» для CentOS или Ubuntu (без кавычек);
  • «javac -version» для ArchLinux (без кавычек).

В системе может быть установлено более 1 среды или версии, тогда пользователь должен выбрать номер той версии, которая будет запускаться по умолчанию.

Если же установка необходима, то скачивайте с сайта-установщика:

  • jdk-8u311-linux-x64.rpm для 64 битной системы;
  • jdk-8u311-linux-i586.rpm для 32 битной системы.

Обратите внимание, что установить комплект разработчика может любой пользователь без root-прав, но для установки в системную папку потребуются root-права.

Установка JDK на Windows 10 и 11

Прежде чем установить JDK на Windows 11 или 10 проверьте её наличие через командную строку с помощью команды «java – -version». Если среда уже установлена, то можно начинать работу, если же нет, то скачиваете подходящую для вашей системы с официального сайта или другого источника. Затем запускаете установочный файл и ставите комплект как обычную программу. При необходимости сразу же скачиваете и устанавливаете JVM и JRE подходящей версии.

Установка JDK на Windows 7 или 8
 Установка JDK на Windows 7 ничем не отличается от установки обычной программы из zip-архива. Вручную нужно будет настроить путь до версии, чтобы используемая среда разработки могла использовать инструменты JDK. Делается это так:

  • Нажмите «Win+R»;
  • в окне введите «sysdm.cpl» и подтвердите: «ОК»;
  • во вкладке «Дополнительно» выберите «Переменные среды»;
  • вы увидите список переменных сред, вариант «Создать»: имя переменной: JAVA_HOME;
  • «Значение переменной»: укажите ваш путь до папки с JDK на компьютере (например, C:\Program Files\Java\jdk-12).

Не забывайте о соблюдении регистра.

Теперь вы знаете, как установить основной инструмент Java на свой компьютер, и какие условия ему нужны для работы. 

КУРС

DATA SCIENCE ACADEMY

Научитесь использовать инструменты анализа данных, включая языки программирования и средства визуализации.

Протестируйте насколько вам подходят наши курсы в течение 3 дней бесплатно

This article shows you the JDK 17 installation on Windows 10 operating system. The JDK 21 is the latest Long Term Support (LTS) release by Oracle as of January 2024.

The Java Development Kit (JDK) is a development environment for building applications and components using the Java programming language. The JDK includes tools for developing and testing programs written in the Java programming language and running on the Java platform.

Other JDK Downloads for Windows 10

Java 8, Java 11, Java 17, Java 19, Java 20, Java 21

Other JDK Downloads for Windows 11

Java 8, Java 11, Java 17, Java 19, Java 20, Java 21

Table of Contents

Software Dependency

  • JDK 17
  • Windows 10

Here we are going to download JDK 17 and install it on the 64-bit Windows 10 Operating System.

How to Download JDK 17 and Install it on Windows 10?

The installation process of the Java Development Kit (JDK) on the Windows operating system is very simple. Just follow the below steps:

  1. JDK 17 Download for Windows 10 64-bit
  2. JDK 17 Installation on Windows
  3. Setup System Environment Variables
  4. Verify the Java Installation

Step-1: Download JDK 17 for Windows 10 64-bit

To download JDK software, visit its official website Oracle Website’s Java and go to Java SE Development Kit 17.0.2, and click on the highlighted link as shown in the below image.

JDK 17 download | jdk 17 download for windows

Once you click on the link (https://download.oracle.com/java/17/archive/jdk-17.0.2_windows-x64_bin.exe), it will start the downloading of JDK software.

NOTE: Oracle requires an account (sign-in) to download older versions of Java that are no longer available to the public. You can download publicly available versions of Java without signing in which is the latest version only.

Step-2: JDK 17 Installation on Windows

Once you have downloaded the JDK 17 software (jdk-17.0.2_windows-x64_bin.exe), double-click on it to see the start of the installation process.

JDK 17 Installation on Windows

Now click Next to see the below image, Here you have a choice to change the Java installation directory by clicking on the change… button otherwise simply go with the default path by clicking the Next > button. I am going here with the default path only.

JDK 17 Installation on Windows change destination folder

Once you click Next, you will see the start of the installation process as shown below image. After successful installation, you just close the installation wizard.

JDK 17 start installation process on Windows 10

JDK 17 installed successfully on Windows 10

Step-3: Setup System Environment Variables

System Environment Variables path: Right-click on MyComputer -> properties -> Advanced System Settings -> Environment variables

setup jdk environment variables

Now click on the Environment Variables button > add JAVA_HOME & Path as shown in the below images:

JDK 17 JAVA_HOME environment variable setup

Now we should have to add Java Path. If the Path variable is already there then simply we can click on the Edit… button > then click the New button to add the path as below image.

JDK 17 Java Path environment variable setup

Step-4: Verify the Java Installation

To verify the installation open the command prompt(Win+R key and type cmd) and then type java -version and press Enter key.

JDK 17 verify the successful installation

Congratulations! You have successfully installed the Java Development Kit (JDK) 17 on your Windows system.

Now create the first Java Program Hello World!

Conclusion

In this article, you have seen how you install Java Development Kit (JDK) 17 on the Windows 64-bit Operating system. You have also seen how you can verify the successful installation of JDK software on your machine.

Start learning Top Java Logical Programs now.

FAQ

Does JDK 17 include JRE?

No, In JDK 17, JRE is no longer available. In this release, the JRE or Server JRE is no longer offered. Only the JDK is offered.

Related articles:

  • How to Download and Install JDK 11 on Windows 10?
  • JDK 8 Installation on Windows 10 [step-by-step]
  • How to install Maven on Windows System
  • How to install and configure Tomcat Server in Eclipse?
  • Install MySQL Server 8.0.27 [zip Archive] on Windows 10

You may also like:

  • File Upload in Java Servlet Example
  • Spring Boot File Upload with Advance Progress bar in Ajax
  • How to write Excel files in Java using Apache POI?
  • Drag and drop file upload using Javascript

Download Windows Speedup Tool to fix errors and make PC run faster

JDK (Java Development Kit) is a collection of tools required for developing and testing programs in the language. It is a package consisting of Java development tools like java compiler and JRE. It is used for building applications using Java Programming Language. Java is an Object-Oriented Programing language that programmers use to develop java software. Java was developed by James Gosling, and it is owned by Oracle Corporation and Sun Microsystem. It is a platform-independent language. Java 18 is the latest JDK Development Kit for Windows, Linux, and macOS platforms. So without any delay, let us walk you through the process to download the JDK installer for Windows 11/10.

How to download and install Java JDK on Windows

Here are the steps to install JDK (Java Development Kit) on Windows 11/10 computer systems:

  1. Check your Computer Compatibility
  2. Install JDK on the Computer
  3. Set up a Path in Environment Variable
  4. Check for JDK installation

1] Check your Computer Compatibility

How to tell if your computer is 32 or 64-bit Windows

Before installing JDK, it’s imperative to check whether your computer is compatible with the JDK version. JDK is compatible with Windows 11/10/8/7, but you need to be running the 64-bit version of the OS. Check if your system runs on the 32-bit or 64-bit OS, and then you can install JDK if you are on 64-it OS. If your system is 32-bit you need to either upgrade your system or go with a different version of JDK that supports 32-bit architecture.

Once you have verified that your system is compatible with JDK, let’s go straight to the process of downloading the JDK installer in Windows 11/10.

2] Install JDK on the computer

To install the latest version of Java JDK, follow the below process.

  1. First, to get the latest version of Java JDK, open the Java JDK 18 download page
  2. Now, in the Product/File Description go to the Windows x64 Installer
  3. And click on the Download link associated with Windows x64 Installer
  4. Check the box for I reviewed and accept the Oracle Technology Network Licence Agreement for Oracle Java SE
  5. And click on the Download button at the bottom
  6. Once, the download is completed, click on File Explorer > Downloads
  7. Now, double-click on the downloaded file of Java JDK (version may differ) to open it
  8. Click Yes on the UAC (User Account Control) prompt that pop up
  9. Click on the Next button
  10. You can click on Change to select an alternative folder to install Java SE or click on Next to continue with the default location file
  11. The installation is running, wait for the complete

Once done, you have completed half of the process, i.e., download and install JDK in Windows 11/10. However, you still have to set up a path variable for it. So, follow the next steps to do it.

3] Set up a Path in Environment Variable

In the above steps, you have checked your system and downloaded java JDK for your OS. You need to set up a path in Environment Variable to get things up and running. So, follow the below steps to perform this task.

  • Press the Window key to open the Search menu
  • Now, type View advanced system settings and open the first result
  • On the System Properties page, go to the Advanced tab
  • Then, click on the Environment Variables button
  • Go to the System variable section, select the path variable and click on the Edit button
  • Next, click on the New button on the right
  • Copy the below JDK bin folder path and past it over here (For JDK version 18)

C:\Program Files\Java\jdk-18.0.2\bin

  • It may differ on your computer if you have changed the location earlier during the installation process, so make sure to verify it once
  • Click the OK button after past the bin folder path
  • Again go to the Environment Variable page and click on the New button in the System variables
  • Now, on the New System Variable page set the Variable name which you want
  • Copy the below path and past it to the Variable value (For JDK version 18)

C:\Program Files\Java\jdk-18.0.2

  • And click on OK

That’s it, Java JDK has been installed on your computer now you can start working on it right away.

Also read: How to set Java_HOME in Windows

4] Check for JDK installation

Many users have doubts and want to check whether the JDK is installed on their computer or not. If you also want to check, follow the below steps

  • Click on the Windows icon and just type cmd in the search bar
  • Open the Command Prompt and type the below command and hit Enter
Java -version
  • If the Command Prompt lists the version number along with other relevant information, you have JDK installed on the computer
  • But, if you receive a response that Java is not recognized as an internal or external command, operable program, or batch file, it means that you don’t have JDK installed yet. In this case, you need to uninstall JDK first and install it again by following the above steps

How do I update my JDK to the latest version?

Follow the below steps to update JDK to the latest version.

  • Click on the Windows start button > Settings > Control Panel
  • Now, in the Control panel list, click on the Java icon
  • Select the Update tab then click the Update Now button
  • Click Yes to allow changes

Also read: Understand and Manage Java settings in Windows

How do I check my version of Java?

Follow the below steps to check the version of Java JDK version.

  • Open the Window search menu and type cmd
  • Open the Command Prompt and type java -version command
  • After that, click on Enter button
  • Now, you can see the JDK version installed on your computer

You can also use Taskbar search and search for About Java and click on the result to see the Java version.

Also read: Java Virtual Machine Launcher Error, Could not create the Java Virtual Machine.

Sumit is pursuing B.Tech in Delhi. He likes working on Tech and loves writing about it. His areas of interest include but are not limited to Windows, Gaming, Programming, and ANN.

Reader Interactions

Java Development Kit (JDK) is one of the most important tools for developers who use it to build, compile, and run Java applications. It does not matter if you are a beginner or an experienced programmer; installing JDK is the first step towards working with Java development. We can download JDK to create and run Java applications on our system. Also, the JDK is used to create Android application source files as well, using the Java or Kotlin programming language. There are multiple benefits of installing a JDK.

Key Features of JDK:

  • Compiler (javac): Converts Java code into bytecode for JVM execution.
  • JRE + JVM: Includes runtime environment to execute Java programs.
  • Rich Libraries: Pre-built classes for I/O, networking, databases, and more.
  • Debugging Tools: JDK provides JDB (Java Debugger) for troubleshooting code.
  • Multi-Platform Support: JDK supports write-once, run anywhere (Windows, Linux, macOS).

The system will execute the code using a set of Libraries and Compilers. JDK, JRE, and JVM should not be confused with one another.

Refer to this article to learn more: Differences between JDK, JRE, and JVM.

Why Install JDK?

  • To develop and run Java applications
  • Compile Java source code (javac)
  • Includes JRE (Java Runtime Environment) and JVM (Java Virtual Machine)
  • Required for Android app development (Java/Kotlin)

This article describes the step-by-step process for installing and configuring the JDK on Windows, Mac, and Linux.

Java JDK Download

The JDK can be installed on the following Platforms:

  1. Microsoft Windows
  2. Linux
  3. macOS

Download JDK (Java Development Kit)

We need to download the JDK first, find the steps below to get started:

Step 1: Visit the Official Website

Go to the Official JDK website to download the file.

jdk

Oracle Official Website

Since JDK is an open-source, so you can get it from OpenJDK in a few clicks.

jdk-alt2

OpenJDK

Step 2: Select the Appropriate Version

As of 2025, the latest stable versions are JDK 23 (SE) and JDK 21 (LTS). Select the compatible version as per your operating system (Windows, Mac or Linux)

jdk-3

JDK Latest Version — Download

Step 3: License and Agreement

Go through all the License and Agreement before downloading (from Oracle website), it will not ask if you’ll download it from OpenJDK website.

Install JDK on Windows

Follow the below steps to install JDK on Windows environment i.e.Windows 7, Windows 8, Windows 8.1, Windows 10, and Windows 11.

Step 1: Run the Java Development Kit (JDK) Installer

Locate the downloaded .exe file (e.g. jdk-23-windows-x64_bin.exe) and make the double click to begin the Installation process. Follow the installation wizard prompts to complete the installation process.

jdk-win1

JDK Installer for Windows

Step 2: Setup the Environment Variables

Once the installation gets completed, you need to configure environment variables to notify the system about the directory in which the JDK files are located.

Proceed to C:\Program Files\Java\jdk-{YOUR_JDK_VERSION}\bin (replace {-} with your JDK version)

Step 2 - Locating JDK File

Program Files

Step 2.1: To set the Environment Variables, you need to search Environment Variables in the Task Bar and click on “Edit the system environment variables”.

Step 2 - Configuring Environment Variables

System Properties

Step 2.2: Under the Advanced section, Click on «Environment Variables».

Step 2 - Setting Environment Variable

Environment Variables

Step 2.3: Under System variables, select the «Path» variable and click on «Edit». Click on «New» then paste the Path Address i.e. C:\Program Files\Java\jdk-{YOUR_JDK_VERSION}\bin. Click on «OK».

Step 2 - Setting Path Environment Variable

Path

Step 2.4: Now, in the Environment Variables dialogue, under System variables, click on «New» and then under Variable name: JAVA_HOME and Variable value: paste address i.e.

C:\Program Files\Java\jdk-{YOUR_JDK_VERSION}. Click on OK => OK => OK.

Step 2 - Setting JAVA_HOME Environment Variable

System Properties

Step 3: Check the Java Version

Open Command Prompt and enter the following commands:

java -version

javac -version

Command Prompt

Install JDK on Linux

Follow the steps below to install the Java software Development Kit on a Linux environment. These instructions are applicable to various Linux distributions such as Ubuntu, Fedora, and CentOS.

Note: We have used Kali Linux distributions here.

Step 1: Install Oracle Java Development Kit (JDK)

To install the downloaded JDK File using terminal, Open terminal and change your directory to downloads by using the command:

$ cd downloads

To list files and packages present in the directory, Type

$ ls

Step 1 - Change Directory to Downloads for JDK

Root Kali

Step 1.1: Now we use Debian Package Manager to configure our downloaded file for installation by typing

$ sudo dpkg -i jdk-{YOUR_JDK_VERSION} (replace {-} with your version)

Enter your password as we have run an elevated prompt, i.e. the sudo or superuser do command, which is a quick way to grant specific users permission to perform specific system commands at the system’s root (most powerful) level.

Step 1 - Extract Package for Installing JDK

Kali Linux

Step 1.2: Now, Type the following commands to proceed with the installation

$ sudo update-alternatives —install /usr/bin/java java /usr/lib/jvm/jdk-{YOUR_JDK_VERSION}/bin/java 1

$ sudo update-alternatives —install /usr/bin/javac javac /usr/lib/jvm/jdk-{YOUR_JDK_VERSION}/bin/javac 1

Step 2: Check the Java Version

Open the terminal and enter the following commands

$ java —version

$ javac —version

Step 2 - Checking Java Version

sudo

Step 3: Configure JAVA_HOME Environment Variable

After the installation is complete, we have to configure environment variables to notify the system about the directory in which jdk files are located. To find the Location of the JDK Files, run this command and copy the File Location.

$ sudo update-alternatives —config java

In order to set the environment variable, you need to edit the environment file using the following command:

$ sudo gedit /etc/environment

Step 3.1: Proceed to add JAVA_HOME=” /usr/lib/jvm/jdk-{YOUR_JDK_VERSION}

Proceed to save and close the file.

Step 3 - Configuring JAVA_HOME

environment

Step 3.2: Now we have to refresh the environment file by using this command:

$ SOURCE /etc/environment

And echo the JAVA_HOME Path

$ echo $JAVA_HOME

Install JDK on macOS

Follow the steps below to install the Java Development Kit (JDK) on macOS. These instructions are compatible with various versions of macOS, including Mojave, Catalina, Big Sur, Monterey, Ventura, Sonoma the latest macOS Sequoia.

Step 1: Install Oracle Java Development Kit (JDK)

Proceed to Install the JDK kit by following the bootstrapped steps:

Step 1 - Installing Oracle Java Development Kit

Installation

Step 2: Configure Environment Variables

Open the terminal and pass the following commands. To find the Location of the JAVA_HOME, run this command:

$ /usr/libexec/java_home -v{YOUR_VERSION}

Step 2 - Configuring Environment Variables

Configure

Step 2.1: We have to set this output as our JAVA_HOME Environment Variable. You can use any command or code editor to edit the file, here we are using VS Code

$ code ~/. bash_profile

Step 2 - Configuring JAVA_HOME

Terminal

Step 2.2: At the very bottom, we have to export the path we obtained earlier i.e. 

$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-{YOUR_VERSION}.jdk/Contents/Home

Step 2 - Configured JAVA_HOME Path

bash

Step 2.3: Now we have to refresh the environment file by using this command:

$ source ~/.bash_profile

And echo the JAVA_HOME variable

$ echo $JAVA_HOME

Step 2 - Refreshed JAVA_HOME Environment Variable

Java HOME

Step 3: Verify the Java Version

In the terminal, enter the following commands

$ java -version

$ javac -version

Step 3 - Checking Java Version

javac

Advanatages of JDK

The Advanatages of JDK are listed below:

  • Complete Development Kit: It Includes compiler (javac), JRE, JVM, and debugging tools.
  • Platform Independence: It write once, run anywhere (WORA) using JVM.
  • Rich Libraries & APIs: JDK has built-in support for networking, I/O, databases, and more.
  • Performance Optimization: Just-In-Time (JIT) compiler boosts execution speed.
  • Backward Compatibility: Older Java apps still run on newer JDK versions.

Disadvantages of JDK

The disadvantages of JDK are listed below:

  • Large Memory Usage: JDK consumes more RAM compared to some lightweight languages.
  • Complex Setup: Requires manual environment variable configuration.
  • Slower Startup Time: JVM initialization can delay execution.
  • License Restrictions: Oracle JDK requires a commercial license for business use.

Conclusion

Installing the latest JDK version is a simple process, whether you’re on Windows, macOS or Linux. By following this guide, you can setup JDK and start developing Java applications in just a few steps. You can easily download the latest jdk 23 in your system and start with Java development today.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Free ssh server windows
  • Как активировать windows 10 с помощью консоли
  • Business или consumer windows 10 какую ставить
  • Windows 10 мышь сама двигается
  • Windows 10 1507 pro