Как установить java runtime environment windows 10

Скачать инсталлятор, запустить, а когда установится - настроить переменные окружения и удалить лишние исполняемые файлы.

Эта инструкция устарела, используйте вместо неё более новую

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

Поэтому я решил описать процедуру установки Java для операционной системы Windows и последующей настройки системы, потому что, к сожалению, недостаточно просто “запустить инсталлятор и всегда нажимать кнопку Next”.

1. Где взять Java?

На официальном сайте Oracle Java.

2. Какую версию выбрать?

Разумеется, последнюю доступную (на момент написания инструкции это Java 8).

Выбирая из 32-битной и 64-битной версий, берите 64-битную, если ваша операционная система это позволяет, потому что у неё менее строгие ограничения по памяти, доступной исполняемым Java-приложениям.

3. Что устанавливать, JRE или JDK?

Java Runtime Environment, или JRE — это виртуальная машина, позволяющая запускать приложения, написанные на языке программирования Java.

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

Правило очень простое: если вы собираетесь что-нибудь писать на языке программирования Java, значит вам потребуется JDK. А если только запускать готовые программы — тогда достаточно JRE.

4. Установка Java

Вот тут, действительно, всё просто — нужно запустить инсталлятор и следовать указаниям визарда. Можно просто всё время нажимать кнопку Next.

5. Настройка переменных окружения

К сожалению, инсталлятор Java не выполняет настройку переменных окружения, поэтому придётся сделать это вручную после установки.

Во-первых, необходимо установить переменную JAVA_HOME, которая должна указывать на директорию, в которую установлена Java. Многие программы используют эту переменную, чтобы определить, где находится Java.

Во-вторых, надо в переменную PATH добавить путь к директории %JAVA_HOME%bin. Эта переменная указывает операционной системе список директорий, в которых нужно искать исполняемые файлы, и чтобы можно было запускать Java из консоли, переменная PATH должна быть правильно настроена.

Для установки переменных окружения сначала нужно открыть свойства компьютера, либо использовав сочетание клавиш Win-Pause, либо через меню “Пуск”:

Затем нужно выбрать “Дополнительные параметры системы”, в открывшемся диалоге перейти на вкладку “Дополнительно” и нажать кнопку “Переменные среды”, после чего появится диалог настройки переменных окружения.

Если у вас уже есть переменная окружения JAVA_HOME — надо её отредактировать, если нет — создать новую. В качестве значения нужно указать путь к директории, куда установлена Java, то есть, например c:Program FilesJavajdk1.8.0_25, если вы установили JDK, либо c:Program FilesJavajre1.8.0_25, если вы установили только JRE.

После того, как вы установили значение переменной JAVA_HOME, необходимо отредактировать значение переменной PATH, добавив туда путь к директории, где находятся исполняемые файлы Java, то есть %JAVA_HOME%bin

И сохранить всё это, закрыв все открытые диалоги в обратном порядке кнопками OK.

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

После того, как вы изменили переменные окружения, новые значения будут действительны только для новых запускаемых программ, уже запущенные программы не узнают о том, что переменные окружения поменялись. Поэтому если вы, например, пытались запустить Java из консоли и у вас не получилось из-за неправильных настроек переменной PATH, вам придётся перезапустить консоль после того, как вы поменяли значение переменной.

6. Удаление лишних файлов

Запустите консоль (cmd) и выполните в ней команду where java.

В результате вы должны увидеть путь к исполняемому файлу java.exe, который операционная система должна успешно обнаружить в том месте, куда вы установили Java. Если файл не нашёлся — значит неправильно настроена переменная PATH и нужно вернуться к предыдущему пункту.

Однако иногда бывает и наоборот, находятся «лишние» исполняемые файлы:

Происходит это из-за того, что инсталлятор Java вместо того, чтобы правильно настроить переменные окружения, пытается положить исполняемые файлы в директорию C:Windowssystem32

Это не очень хорошо — засоряется системная директория, может возникнуть рассогласование версий Java (в разных директориях разные версии). Поэтому надо удалить из каталога C:Windowssystem32 исполняемые файлы java.exe, javaw.exe и javaws.exe, если они там обнаружатся.

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


#База знаний

  • 18 фев 2021

  • 14

Начинаем разрабатывать на 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 FilesJava

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

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

C:Program FilesJavajdk-11.0.2bin

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

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

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

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

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

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

Далее в разделе «Переменные среды» редактируем системную переменную 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). Здесь можно создать новый проект, открыть или импортировать существующий, а также скачать проект из системы контроля версий.

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

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

Участвовать

Школа дронов для всех
Учим программировать беспилотники и управлять ими.

Узнать больше

Introduction

The Java Development Kit (JDK) is software used for Java programming, along with the Java Virtual Machine (JVM) and the Java Runtime Environment (JRE). The JDK includes the compiler and class libraries, allowing developers to create Java programs executable by the JVM and JRE.

In this tutorial, you will learn to install the Java Development Kit on Windows.

How to install Java on Windows.

Prerequisites

  • A system running Windows 10.
  • A network connection.
  • Administrator privileges.

Note: Develop your core app services on PNAP’s Bare Metal Cloud servers to ensure superior performance. It’s cloud native and the perfect environment for the entire SDLC.

Check if Java Is Installed

Before installing the Java Development Kit, check if a Java version is already installed on Windows. Follow the steps below:

  1. Open a command prompt by typing cmd in the search bar and press Enter.
  2. Run the following command:
java -version
Windows not recognizing the java command because Java isn't installed.

The command outputs the Java version on your system. If Java isn’t installed, the output is a message stating that Java isn’t recognized as an internal or external command.

Download Java for Windows 10

Download the latest Java Development Kit installation file for Windows 10 to have the latest features and bug fixes.

  1. Using your preferred web browser, navigate to the Oracle Java Downloads page.
  2. On the Downloads page, click the x64 Installer download link under the Windows category. At the time of writing this article, Java version 17 is the latest long-term support Java version.
Download the Java Development Kit installation file from Oracle.

Wait for the download to complete.

After downloading the installation file, proceed with installing Java on your Windows system.

Follow the steps below:

Step 1: Run the Downloaded File

Double-click the downloaded file to start the installation.

Step 2: Configure the Installation Wizard

After running the installation file, the installation wizard welcome screen appears.

1. Click Next to proceed to the next step.

The welcome screen of the Java installation wizard.

2. Choose the destination folder for the Java installation files or stick to the default path. Click Next to proceed.

Choose where to install Java.

3. Wait for the wizard to finish the installation process until the Successfully Installed message appears. Click Close to exit the wizard.

Java installation wizard - successful installation.

Set Environmental Variables in Java

Set Java environment variables to enable program compiling from any directory. To do so, follow the steps below:

Step 1: Add Java to System Variables

1. Open the Start menu and search for environment variables.

2. Select the Edit the system environment variables result.

Find the Edit system environment variables option.

3. In the System Properties window, under the Advanced tab, click Environment Variables…

Locating the Environment variables option under System properties in Windows.

4. Under the System variables category, select the Path variable and click Edit:

Editing the Path variable in Windows.

5. Click the New button and enter the path to the Java bin directory:

Adding a new Java variable in Windows.

Note: The default path is usually C:Program FilesJavajdk-17.0.1bin.

6. Click OK to save the changes and exit the variable editing window.

Step 2: Add JAVA_HOME Variable

Some applications require the JAVA_HOME variable. Follow the steps below to create the variable:

1. In the Environment Variables window, under the System variables category, click the New… button to create a new variable.

Create a new JAVA_HOME variable in Windows.

2. Name the variable as JAVA_HOME.

3. In the variable value field, paste the path to your Java jdk directory and click OK.

4. Confirm the changes by clicking OK in the Environment Variables and System properties windows.

Test the Java Installation

Run the java -version command in the command prompt to make sure Java installed correctly:

Running the java command to see Java version on Windows.

If installed correctly, the command outputs the Java version. Make sure everything works by writing a simple program and compiling it. Follow the steps below:

Step 1: Write a Test Java Script

1. Open a text editor such as Notepad++ and create a new file.

2. Enter the following lines of code and click Save:

class HelloWorld{
	public static void main(String args[]){
		System.out.println("Hello world!");
		}
}
Writing a Java program to test if the installation works.

3. Name the file and save it as a Java source file (*.java).

Saving the Java program in Windows.

Note: When using Notepad, select All files for the Save as type option and add the .java extension to the file name.

Step 2: Compile the Test Java Script

1. In the command prompt, change the directory to the file’s location and use the following syntax to compile the program:

javac [filename]

For example:

Compiling a Java program using the command prompt.

After a successful compilation, the program generates a .class file in the file directory.

2. Run the program with the following syntax:

java [filename]
Run a java Hello world program using the command prompt.

The output shows that the program runs correctly, displaying the Hello world! message.

Conclusion

This tutorial showed how to install the Java Development Kit on a Windows system. If you are interested in learning more about Java, read our list of 13 best Java IDEs for writing, debugging, and testing Java code.

C: Users Имя пользователя AppData LocalLow Sun Java Deployment кэш

папка в формате JAR. Вы можете установить уровень сжатия для этих файлов JAR и даже установить сумму, которая будет выделена для хранения этих файлов.

Вы можете просмотреть файлы, нажав кнопку Просмотр .

Чтобы удалить эти временные файлы JAR Java, нажмите Удалить файлы . Теперь вы можете выбрать, какие файлы вы хотите удалить, и нажмите кнопку ОК.

Чтобы очистить кэш Java с помощью командной строки, откройте окна командной строки, введите следующую команду и нажмите Enter:

Мы склонны игнорировать обновление нашей Java. Но очень важно, чтобы мы всегда были уверены, что вы используете последнюю версию Java, поскольку уязвимости в Java часто используются для компрометации вашего компьютера. Последняя версия Java содержит важные улучшения для повышения безопасности, производительности и стабильности приложений Java, которые работают на вашем компьютере. Всякий раз, когда дыры в безопасности обнаруживаются, они исправляются, и поэтому обязательно убедитесь, что у вас установлена ​​последняя версия java, поскольку она включает исправления уязвимостей.

Вы можете настроить параметры обновления Java, нажав на вкладку Обновить .

Убедитесь, что Автоматически проверять наличие обновлений . Нажав на кнопку Дополнительно , вы сможете установить частоту проверок обновлений.

Кстати, я заметил, что прошло много времени с тех пор, как я обновил Java. Поэтому я нажал на Обновить сейчас , чтобы начать процесс обновления. Это запустит процесс juscheck.exe , который проверит наличие обновлений и, соответственно, проинформирует вас.

Нажав на кнопку «Установить», вы начнете процесс обновления. По завершении нажмите «Закрыть».

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

Вкладка Безопасность позволяет просматривать типы сертификатов, позволяющие идентифицировать себя.

На вкладке Дополнительно можно настроить другие параметры.

Хранение старых и неподдерживаемых версий Java в вашей системе представляет серьезную угрозу безопасности.

Более старые версии SunJava (до JRE 6 с обновлением 7) действительно сохранялись при установке обновлений и должны быть удалены, так как более старые версии SunJava очень уязвимы для Winfixer/Vundo. С 2005 года вплоть до обновления в конце прошлого года до обновления 10 JRE 6 для SunMicrosystems и Sun Microsystems, чтобы автообновление SunJava удаляло предыдущие (уязвимые) версии программы. Обновления от JRE 6 Update 10 forward находятся в автономной папке «jre6», которая перезаписывается, если установлена ​​новая JRE. Даже при использовании самой последней версии SunJava, если на вашем компьютере все еще находятся более ранние, уязвимые версии, они уязвимы для заражения.К сожалению, простое использование программ «Установка и удаление программ» для удаления старых версий неэффективно.

Мы предлагаем вам попробовать JavaRa. После обновления Java до его последней версии сегодня я запустил JavaRa и использовал его для удаления старых версий Java.

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

ПРИМЕЧАНИЕ. Мой коллега по MVP и мод Corrine TWCF добавляет: JavaRa не была обновлена ​​для поддержки удаления JRE 7 и, по-видимому, фактически имеет проблемы после JRE 6u32. Он перешел на SingularLabs.com. Кроме того, Пол Маклейн больше не поддерживает JavaRa, а Фриде Фрис все еще поддерживает.

Java Скачать

Вы можете скачать и установить Java для Windows вручную с Java.com здесь.

Надеюсь, вы узнали что-то новое здесь, в этом посте. Если у вас есть что добавить, пожалуйста, сделайте это в разделе комментариев.

9 Installation of the JDK and the JRE on Microsoft Windows Platforms

System Requirements for Installing the JDK and the JRE on 64-Bit Windows Platform

The JDK and the JRE have minimum processor, disk space, and memory requirements for 64-bit Windows platform.

Before installing the JDK or the JRE on your 64-bit Windows platform, you must verify that it meets the following minimum processor, disk space, and memory requirements.

Both the JDK and JRE require at minimum a Pentium 2 266 MHz processor.

Disk Space Requirements

For JDK 10 , you are given the option of installing the following features:

Public Java Runtime Environment

When you install 64-bit JDK, then 64-bit public JRE also gets installed. The following table provides the disk requirements for the installed features:

JDK Installed Image
Development Tools: 64-bit platform 500 MB
Source Code 54.2 MB
JRE Installed Image
Public Java Runtime Environment 200 MB
Java Update 2 MB

On Windows 64-bit operating systems, the Java runtime requires a minimum of 128 MB of memory.

The minimum physical RAM is required to run graphically based applications. More RAM is recommended for applets running within a browser using the Java Plug-in. Running with less memory may cause disk swapping, which has a severe effect on performance. Very large programs may require more RAM for adequate performance.

JDK and JRE Installation Instruction Notation for Windows

For any text in this document that contains the following notation, you must substitute the appropriate update version number:

If you are downloading the JDK installer for 64-bit systems for update 10 Interim 0, Update 2, and Patch 1, then the file name jdk- 10 . interim.update.patch _windows-x64_bin.exe becomes jdk- 10 .0.2.1_windows-x64_bin.exe .

If you are downloading the JRE installer for 64-bit systems for update 10 Interim 0, Update 2, and Patch 1, then the file name jre- 10 . interim.update.patch _windows-x64_bin.exe becomes jre- 10 .0.2.1_windows-x64_bin.exe .

JDK Installation Instructions for Windows

You run a self-installing executable file to unpack and install the JDK on Windows computers.

Install JDK on Windows computers by performing the actions described in the following topics:

Downloading the JDK Installer

In a browser, go to the Java SE Development Kit 10 Downloads page and click Accept License Agreement . Under the Download menu, click the Download link that corresponds to the .exe for your version of Windows.

Download the file jdk- 10 . interim.update.patch _windows-x64_bin.exe .

Verify the successful completion of file download by comparing the file size on the download page and your local drive.

Running the JDK Installer

  1. Start the JDK 10 installer by double-clicking the installer’s icon or file name in the download location.
  2. Follow the instructions provided by the Installation wizard.

Installing the JDK Silently

Instead of double-clicking or opening the JDK installer, you can perform a silent, noninteractive, JDK installation by using command-line arguments.

The following table lists example installation scenarios and the commands required to perform them. The notation jdk stands for the downloaded installer file base name, such as jdk- 10 _windows-x64_bin.exe .

Installation Scenario Command
Install JDK and public JRE in silent mode.
Install development tools and source code in silent mode but not the public JRE.
Install development tools, source code, and the public JRE in silent mode.
Install the public JRE in the specified directory C:test in silent mode.

Setting the PATH Environment Variable

It is useful to set the PATH variable permanently for JDK 10 so that it is persistent after rebooting.

The PATH variable is set automatically for the JRE. This topic only applies to the JDK.

If you do not set the PATH variable, then you must specify the full path to the executable file every time that you run it. For example:

  1. Select Control Panel and then System .
  2. Click Advanced and then Environment Variables .
  3. Add the location of the bin folder of the JDK installation to the PATH variable in System Variables .

The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. Microsoft Windows looks for programs in the PATH directories in order, from left to right.

You should only have one bin directory for a JDK in the path at a time. Those following the first instance are ignored.

If you are not sure where to add the JDK path, append it.

The new path takes effect in each new command window that you open after setting the PATH variable.

The following is a typical value for the PATH variable:

JRE Installation Instructions for Windows

When installing JRE on Windows computers, you must select the JRE installer that is appropriate for your Windows system.

The 64-bit Windows operating systems come with a 64-bit Internet Explorer (IE) browser as the standard (default) for viewing web pages.

Install JRE on Windows computers by performing the actions described in the following topics:

JRE Proxy Settings and Authentication

To use the Windows Online Installer, you must be connected to the internet.

If you are running behind a proxy server, then you must have your proxy settings correctly configured. If they are not configured, or are incorrectly configured, then the installer will terminate with the following message:

The installer cannot proceed with the current Internet Connection settings.

Please visit the following website for more information.

If you see this message, check your proxy settings:

In the Control Panel , double-click Internet Options , select the Connections tab, and click the LAN Settings .

If you do not know what the correct settings should be, check with your internet provider or system administrator.

Downloading the JRE Installer

The JRE Installer is located on the Java SE Runtime Environment 10 Downloads page.

    In a browser, go to the Java SE Runtime Environment 10 Downloads page.

The following JRE installers are available for you to download:

Windows Offline: jre- 10 . interim.update.patch _windows-x64_bin.exe

Windows Tar: jre- 10 . interim.update.patch _windows-x64_bin.tar.gz

The Windows Offline installer and Windows installer contains everything that is required to install the JRE.

The Microsoft Windows Installer (MSI) Enterprise JRE Installer is also available, which enables you to install the JRE across your enterprise. It requires a commercial license for use in production.

Running the JRE Installer

  1. Start the JRE 10 Installer by double-clicking the installer’s icon or file name in the download location.
  2. Follow the instructions provided by the Installation wizard.

The private JRE installed with the JDK is not registered. To register the JRE, you must set the PATH environment variable to point to JAVA_HOME bin , where JAVA_HOME is the location where you installed the private JRE . See Setting the PATH Environment Variable.

By default, the Java Access Bridge is disabled. To enable it, see Enabling and Testing Java Access Bridge in the Java Platform, Standard Edition Java Accessibility Guide .

To access essential Java information and functions in Microsoft Windows 7 and Windows 10 machines, after installation, click the Start menu and then select Java . The Java directory provides access to Help, Check for Updates, and Configure Java.

The Microsoft Windows 8 and Windows 8.1 do not have a Start menu. However, the Java information is available in the following Start directory: %ALLUSERSPROFILE%MicrosoftWindowsStart MenuPrograms .

Windows Registry Settings

The installation program for the Microsoft Windows version of the Java SE Runtime Environment uses the registry to store path and version information.

It creates the following registry keys:

This key contains the string CurrentVersion , with a value that is the highest installed version on the system.

JavaHome : the full path name of the directory in which the JRE is installed

RuntimeLib : the full path name of the Java runtime DLL

HKEY_LOCAL_MACHINESoftwareJavaSoftJava Web Start

This key is created for Java Web Start.

If there are two versions of JDK or JRE installed on a system, one with the new version-string format introduced in JDK 10 , and the other with the older version format, then there will be two different CurrentVersion registry key values. For example, if JDK 1.8.0 and JDK 10 are installed, then the following registry keys are created:

«HKEY_LOCAL_MACHINESOFTWAREJavaSoftJava Development Kit» for JDK 1.8.0 and «HKEY_LOCAL_MACHINESOFTWAREJavaSoftJDK» for JDK 10 .

The registry layout for this example is:

The @CurrentVersion is a registry string in the «JDK» or «Java Development Kit» key.

For the same example, if the JRE is installed, then the registry layout is:

The @CurrentVersion is a registry string in the «JRE» or «Java Runtime Environment» key.

Beginning to Use the JDK

Use the Java item in the Windows Start menu to access essential Java information and functions, including Help, API documentation, the Java Control Panel, checking for updates, and Java Mission Control.

Java Start Menu Installed by JDK

During JDK install, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java Development Kit folder is created in the Windows Start menu, which contains the following items:

Reference Documentation : Opens the Online API documentation web page.

Java Mission Control : Opens the Java Mission Control profiling and diagnostics tools suite.

Java Mission Control is a commercial feature available to users with a Java SE Advanced license.

During JDK installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JDK version on the system

The Windows 7 and Windows 10 have a Start menu; however, the menu is not available in Windows 8 and Windows 8.1. The JDK and Java information in Windows 8 and Windows 8.1 is available in the following Start directory: %ALLUSERSPROFILE%MicrosoftWindowsStart MenuPrograms .

Java Start Menu Installed by JRE

During JRE installation, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java folder is created in the Windows Start menu, which contains the following items:

About Java : Opens the Java Control Panel with focus on the General tab. The tab displays the latest JRE version installed on the system.

Check for Updates : Opens the Java Control Panel with focus on the Update tab

Configure Java : Opens the Java Control Panel with focus on the General tab

Get Help : Opens the Java Help Center

Visit Java.com : Opens the Java Download page

During JRE installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JRE version on the system.

The Windows 7 and Windows 10 have Start menu, however the menu is not available in Windows 8 and Windows 8.1. The JRE and Java information in Windows 8 and Windows 8.1 is available in the following Start directory: %ALLUSERSPROFILE%MicrosoftWindowsStart MenuPrograms .

Java Web Start

Java Web Start is an application-deployment technology that gives you the power to run full-featured applications with a single click from your web browser.

With Java Web Start, you can download and run applications, such as a complete spreadsheet program or an internet chat client, without going through complicated installation procedures. With Java Web Start, you run applications simply by clicking a web page link. If the application is not present on your computer, Java Web Start automatically downloads all necessary files. It then caches the files on your computer so that the application is always ready to be run anytime that you want — either from an icon on your desktop or from the browser link. No matter which method you use to run the application, the most current, available version of the application is always presented to you.

Upgrading from Previous Versions

If you have a previous version of Java Web Start, do not uninstall it. Uninstalling it will cause the download cache to be cleared, and all previously installed Java Web Start application data will have to be downloaded again. The new version will write over previous installations and automatically update browsers to use the new version. The configuration files and the program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade because Java Web Start will translate your settings to the new form.

The only way to uninstall Java Web Start is to uninstall the JDK or JRE. Uninstalling the JDK or JRE will not, however, remove the cache for previous versions of Java Web Start. Previous releases have separate uninstallation instructions for Java Web Start.

You may see a misleading message if you do the following:

Download and cache a Java Web Start application with the JDK or JRE.

Remove the JDK or JRE using Add or Remove Programs from the Windows Control Panel .

Remove the Java Web Start application using Add or Remove Programs .

When you remove the application, you see an Uninstaller Error dialog box saying:

An error occurred while trying to remove Java-Application: name App. It may have already been uninstalled. Would you like to remove Java-Application: name App from the Add or Remove program list?

If you say Yes to this, then you will see another Uninstaller Error dialog box saying:

You do not have sufficient access to remove Java-Application: name App from the Add or Remove Program list. Please contact your system administrator.

The message is displayed when you have removed the Java Web Start application while uninstallating the JDK or JRE, but this is not reflected in the Add or Remove Programs . Refresh the Add or Remove Programs by pressing F5 or reopen the panel.

To avoid seeing the misleading message, either press F5 or reopen the dialog box. Any Java Web Start application that was downloaded and cached with the JDK or JRE will no longer appear in the list of currently installed programs.

Java Plug-in

Java Plug-in technology, included as part of the JRE, establishes a connection between popular browsers and the Java platform. This connection enables applets on websites to be run within a browser on the desktop.

The Java Plug-in is automatically enabled for supported web browsers during installation of the JRE. No user intervention is necessary.

In Java SE 10 , the version of the Java Plug-in that is available in versions of the JRE prior to Java SE 6 Update 10 has been deprecated. However, this earlier version of the Java Plug-in is still shipped with Java SE 10 for compatibility purposes but is no longer fully supported. It will be removed in a future release.

Option to Disable the JRE Out-of-Date Warning

When the installed JRE falls below the security baseline or passes its built-in expiration date, an additional warning is shown to users to update their installed JRE to the latest version. For businesses that manage the update process centrally, users attempting to update their JRE individually, may cause problems.

A deployment property, deployment.expiration.check.enabled is available that can be used to disable the JRE out of date warning. To suppress this specific warning message, add the following entry in the deployment properties file:

To disable automatic updates, on the Update tab of the Java Control Panel, deselect the Check for Updates Automatically check box.

Uninstalling the JDK on Windows

Uninstalling the JRE on Windows

Use either of the following ways to uninstall JRE:

Go to Add/Remove Programs utility in the Microsoft Windows Control Panel and uninstall the older versions of JRE.

Remove JRE using the online Java Uninstall Tool.

The Java Removal Tool is integrated with the JRE installer. After JRE 10 is installed, the Java Removal Tool provides the list of outdated Java versions in the system and helps you to remove them.

The Java Uninstall tool will not run if your system administrator specified a deployment rule set in your organization.

A deployment rule set enables enterprises to manage their Java desktop environment directly and continue using legacy business applications in an environment of ever-tightening Java applet and Java Web Start application security policies. A deployment rule set enables administrators to specify rules for applets and Java Web Start applications; these rules may specify that a specific JRE version must be used. Consequently, the Java Uninstall tool will not run if it detects a deployment rule set to ensure that no required JREs are uninstalled.

See Deployment Rule Set in the Java Platform, Standard Edition Deployment Guide .

JDK Installation Troubleshooting

The following sections provide tips for working around problems that are sometimes seen during or while following installation instructions.

System Error During Decompression

If you see the error message system error during decompression , then you might not have enough space on the disk that contains your TEMP directory.

Program Cannot Be Run in DOS Mode

If you see the error message This program cannot be run in DOS mode , then do the following:

Open the MS-DOS shell or command prompt window.

Right-click the title bar.

Select the Program tab.

Ensure that the item Prevent MS-DOS-based programs from detecting Windows is not selected.

Select OK again.

Exit the MS-DOS shell.

Restart your computer.

Source Files in Notepad

In Microsoft Windows, when you create a new file in Microsoft Notepad and then save it for the first time, Notepad usually adds the .txt extension to the file name. Therefore, a file that you name Test.java is actually saved as Test.java.txt . Note that you cannot see the .txt extension unless you turn on the viewing of file extensions (in Microsoft Windows Explorer, deselect Hide file extensions for known file types under Folder Options ). To prevent the .txt extension, enclose the file name in quotation marks, such as «Test.java» when entering information in the Save As dialog box.

Characters That Are Not Part of the System Code Page

It is possible to name directories using characters that are not part of the system locale’s code page. If such a directory is part of the installation path, then generic error 1722 occurs, and installation is not completed. Error 1722 is a Windows installer error code. It indicates that the installation process has failed. The exact reason for this error is not known at this time.

To prevent this problem, ensure that the user and system locales are identical, and that the installation path contains only characters that are part of the system locale’s code page. User and system locales can be set in the Regional Options or Regional Settings control panel.

The associated bug number is 4895647.

Windows Online Installation and Java Update FAQ

These are frequently asked questions about JDK 10 and JRE 10 online installation and Java updates on Windows computers.

1. I downloaded the installer and it is less than 1 megabyte. Why is it so small?

The Windows Online Installer for the JRE will download more installer files. Using this installer helps users to avoid downloading unnecessary files.

2. I had the Java Control Panel open for Java Update and the About tab showed the version of the JRE installed in my computer. Then I ran Java Update, and the version of the JRE that the Java Control Panel is showing has not changed. Why is this?

You need to close and restart the Java Control Panel to get the updated Control Panel.

3. Netscape/Mozilla is not working correctly with Java Plug-in. Why?

First, close all the browsers sessions. If this does not work, reboot the system and try again.

4. I try to install on the D: drive and Java Update is still installing files onto the C: drive. Why?

Regardless of whether an alternate target directory was selected, Java Update needs to install some files on the Windows system drive.

5. How can I uninstall the Java Update version that I just installed?

If you want to uninstall the JRE, then use the Add/Remove Programs utility in the Microsoft Windows . Select the Control Panel and then Add/Remove Programs .

6. After the JRE bootstrap installer is downloaded and executed, why does the message «This installer cannot proceed with the current Internet Connection settings of your system. In your Windows Control Panel, please check Internet Options -> Connections to make sure the settings and proxy information are correct.» appear?

The JRE bootstrap installer uses the system Internet Connection settings to connect to the web for downloading extra files. If you are behind a firewall and require proxy settings, then ensure that the proxy settings in Internet Options/Internet Properties are set up properly (select Start , then Control Panel , then Internet Options/Internet Properties , then Connections , and then LAN Settings ). If you can browse the external web (for example, outside the firewall) with Internet Explorer, then your proxy settings are properly set up. The installer does not understand the proxy settings specified in Netscape/Mozilla.

7. I found the jusched.exe process running in the background of my system after installing JRE. Is there a way to shut it down?

The jusched.exe is the scheduler process of Java Update. This process runs automatically. To shut in the Java Control Panel on the Update tab, deselect the Check for Updates Automatically check box.

8. When I click the Update Now button from the Java Control Panel, it complains about the system being «offline.» What does that mean?

Java Update can be run only if the system is connected to the network. A system that is not connected to the network is referred to as being offline. When the Update Now is clicked, it will check the online/offline status of your system. If your computer does not have internet access, then the error message is displayed. Check that your system is currently connected to the internet and try again.

9. I followed the instructions to install a specific version of the JRE. After the installation, a message is displayed from system tray saying an update is available for download. What should I do?

The message is part of the Java Auto Update mechanism, which detects at user login time if a newer version of the JRE is available for download. In the system tray, click the Java Update icon to download and install the update.

10. I encountered the error «This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.» when running the Java SE installer.

There are several possible reasons for this error to be displayed; a few are listed:

Network connection fails.

Download manager software interrupts the download process.

Another application, such as an antivirus application, may interrupt the installation process.

To address these problems, ensure that the third-party downloader applications are turned off and the network connection is configured properly. Also, if a proxy is in use, then ensure that the proxy authentication is turned off.

11. I encountered the error «Error 1722. There is a problem with this Windows installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.»

See Error 1722: Problem with Windows Installer Package. If you encounter any other errors or issues, then you can access Java Help Center, which contains solutions for issues that you might encounter when downloading and installing Java on your system. In particular, you can search for solutions by error number. Searching for «Error 1722» returns a solution to this issue.

. как установить Java на Windows?

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

Поэтому я решил описать процедуру установки Java для операционной системы Windows и последующей настройки системы, потому что, к сожалению, недостаточно просто “запустить инсталлятор и всегда нажимать кнопку Next”.

1. Где взять Java?

2. Какую версию выбрать?

Разумеется, последнюю доступную (на момент написания инструкции это Java 8).

Выбирая из 32-битной и 64-битной версий, берите 64-битную, если ваша операционная система это позволяет, потому что у неё менее строгие ограничения по памяти, доступной исполняемым Java-приложениям.

3. Что устанавливать, JRE или JDK?

Java Runtime Environment, или JRE — это виртуальная машина, позволяющая запускать приложения, написанные на языке программирования Java.

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

Правило очень простое: если вы собираетесь что-нибудь писать на языке программирования Java, значит вам потребуется JDK. А если только запускать готовые программы — тогда достаточно JRE.

4. Установка Java

Вот тут, действительно, всё просто — нужно запустить инсталлятор и следовать указаниям визарда. Можно просто всё время нажимать кнопку Next.

5. Настройка переменных окружения

К сожалению, инсталлятор Java не выполняет настройку переменных окружения, поэтому придётся сделать это вручную после установки.

Во-первых, необходимо установить переменную JAVA_HOME , которая должна указывать на директорию, в которую установлена Java. Многие программы используют эту переменную, чтобы определить, где находится Java.

Во-вторых, надо в переменную PATH добавить путь к директории %JAVA_HOME%bin . Эта переменная указывает операционной системе список директорий, в которых нужно искать исполняемые файлы, и чтобы можно было запускать Java из консоли, переменная PATH должна быть правильно настроена.

Для установки переменных окружения сначала нужно открыть свойства компьютера, либо использовав сочетание клавиш Win-Pause, либо через меню “Пуск”:

Затем нужно выбрать “Дополнительные параметры системы”, в открывшемся диалоге перейти на вкладку “Дополнительно” и нажать кнопку “Переменные среды”, после чего появится диалог настройки переменных окружения.

Если у вас уже есть переменная окружения JAVA_HOME — надо её отредактировать, если нет — создать новую. В качестве значения нужно указать путь к директории, куда установлена Java, то есть, например c:Program FilesJavajdk1.8.0_25 , если вы установили JDK, либо c:Program FilesJavajre1.8.0_25 , если вы установили только JRE.

После того, как вы установили значение переменной JAVA_HOME , необходимо отредактировать значение переменной PATH, добавив туда путь к директории, где находятся исполняемые файлы Java, то есть %JAVA_HOME%bin

И сохранить всё это, закрыв все открытые диалоги в обратном порядке кнопками OK.

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

После того, как вы изменили переменные окружения, новые значения будут действительны только для новых запускаемых программ, уже запущенные программы не узнают о том, что переменные окружения поменялись. Поэтому если вы, например, пытались запустить Java из консоли и у вас не получилось из-за неправильных настроек переменной PATH , вам придётся перезапустить консоль после того, как вы поменяли значение переменной.

6. Удаление лишних файлов

Запустите консоль ( cmd ) и выполните в ней команду where java .

В результате вы должны увидеть путь к исполняемому файлу java.exe , который операционная система должна успешно обнаружить в том месте, куда вы установили Java. Если файл не нашёлся — значит неправильно настроена переменная PATH и нужно вернуться к предыдущему пункту.

Однако иногда бывает и наоборот, находятся «лишние» исполняемые файлы:

Происходит это из-за того, что инсталлятор Java вместо того, чтобы правильно настроить переменные окружения, пытается положить исполняемые файлы в директорию C:Windowssystem32

Это не очень хорошо — засоряется системная директория, может возникнуть рассогласование версий Java (в разных директориях разные версии). Поэтому надо удалить из каталога C:Windowssystem32 исполняемые файлы java.exe , javaw.exe и javaws.exe , если они там обнаружатся.

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

Алексей Баранцев

Автор: Алексей Баранцев

Если вам понравилась эта статья, вы можете поделиться ею в социальных сетях (кнопочки ниже), а потом вернуться на главную страницу блога и почитать другие мои статьи.
Ну а если вы не согласны с чем-то или хотите что-нибудь дополнить – оставьте комментарий ниже, может быть это послужит поводом для написания новой интересной статьи.

9 Installation of the JDK and the JRE on Microsoft Windows Platforms

System Requirements for Installing the JDK and the JRE on 64-Bit Windows Platform

The JDK and the JRE have minimum processor, disk space, and memory requirements for 64-bit Windows platform.

Before installing the JDK or the JRE on your 64-bit Windows platform, you must verify that it meets the following minimum processor, disk space, and memory requirements.

Both the JDK and JRE require at minimum a Pentium 2 266 MHz processor.

Disk Space Requirements

For JDK 10 , you are given the option of installing the following features:

Public Java Runtime Environment

When you install 64-bit JDK, then 64-bit public JRE also gets installed. The following table provides the disk requirements for the installed features:

JDK Installed Image
Development Tools: 64-bit platform 500 MB
Source Code 54.2 MB
JRE Installed Image
Public Java Runtime Environment 200 MB
Java Update 2 MB

On Windows 64-bit operating systems, the Java runtime requires a minimum of 128 MB of memory.

The minimum physical RAM is required to run graphically based applications. More RAM is recommended for applets running within a browser using the Java Plug-in. Running with less memory may cause disk swapping, which has a severe effect on performance. Very large programs may require more RAM for adequate performance.

JDK and JRE Installation Instruction Notation for Windows

For any text in this document that contains the following notation, you must substitute the appropriate update version number:

If you are downloading the JDK installer for 64-bit systems for update 10 Interim 0, Update 2, and Patch 1, then the file name jdk- 10 . interim.update.patch _windows-x64_bin.exe becomes jdk- 10 .0.2.1_windows-x64_bin.exe .

If you are downloading the JRE installer for 64-bit systems for update 10 Interim 0, Update 2, and Patch 1, then the file name jre- 10 . interim.update.patch _windows-x64_bin.exe becomes jre- 10 .0.2.1_windows-x64_bin.exe .

JDK Installation Instructions for Windows

You run a self-installing executable file to unpack and install the JDK on Windows computers.

Install JDK on Windows computers by performing the actions described in the following topics:

Downloading the JDK Installer

In a browser, go to the Java SE Development Kit 10 Downloads page and click Accept License Agreement . Under the Download menu, click the Download link that corresponds to the .exe for your version of Windows.

Download the file jdk- 10 . interim.update.patch _windows-x64_bin.exe .

Verify the successful completion of file download by comparing the file size on the download page and your local drive.

Running the JDK Installer

  1. Start the JDK 10 installer by double-clicking the installer’s icon or file name in the download location.
  2. Follow the instructions provided by the Installation wizard.

Installing the JDK Silently

Instead of double-clicking or opening the JDK installer, you can perform a silent, noninteractive, JDK installation by using command-line arguments.

The following table lists example installation scenarios and the commands required to perform them. The notation jdk stands for the downloaded installer file base name, such as jdk- 10 _windows-x64_bin.exe .

Installation Scenario Command
Install JDK and public JRE in silent mode.
Install development tools and source code in silent mode but not the public JRE.
Install development tools, source code, and the public JRE in silent mode.
Install the public JRE in the specified directory C:test in silent mode.

Setting the PATH Environment Variable

It is useful to set the PATH variable permanently for JDK 10 so that it is persistent after rebooting.

The PATH variable is set automatically for the JRE. This topic only applies to the JDK.

If you do not set the PATH variable, then you must specify the full path to the executable file every time that you run it. For example:

  1. Select Control Panel and then System .
  2. Click Advanced and then Environment Variables .
  3. Add the location of the bin folder of the JDK installation to the PATH variable in System Variables .

The PATH environment variable is a series of directories separated by semicolons (;) and is not case-sensitive. Microsoft Windows looks for programs in the PATH directories in order, from left to right.

You should only have one bin directory for a JDK in the path at a time. Those following the first instance are ignored.

If you are not sure where to add the JDK path, append it.

The new path takes effect in each new command window that you open after setting the PATH variable.

The following is a typical value for the PATH variable:

JRE Installation Instructions for Windows

When installing JRE on Windows computers, you must select the JRE installer that is appropriate for your Windows system.

The 64-bit Windows operating systems come with a 64-bit Internet Explorer (IE) browser as the standard (default) for viewing web pages.

Install JRE on Windows computers by performing the actions described in the following topics:

JRE Proxy Settings and Authentication

To use the Windows Online Installer, you must be connected to the internet.

If you are running behind a proxy server, then you must have your proxy settings correctly configured. If they are not configured, or are incorrectly configured, then the installer will terminate with the following message:

The installer cannot proceed with the current Internet Connection settings.

Please visit the following website for more information.

If you see this message, check your proxy settings:

In the Control Panel , double-click Internet Options , select the Connections tab, and click the LAN Settings .

If you do not know what the correct settings should be, check with your internet provider or system administrator.

Downloading the JRE Installer

The JRE Installer is located on the Java SE Runtime Environment 10 Downloads page.

    In a browser, go to the Java SE Runtime Environment 10 Downloads page.

The following JRE installers are available for you to download:

Windows Offline: jre- 10 . interim.update.patch _windows-x64_bin.exe

Windows Tar: jre- 10 . interim.update.patch _windows-x64_bin.tar.gz

The Windows Offline installer and Windows installer contains everything that is required to install the JRE.

The Microsoft Windows Installer (MSI) Enterprise JRE Installer is also available, which enables you to install the JRE across your enterprise. It requires a commercial license for use in production.

Running the JRE Installer

  1. Start the JRE 10 Installer by double-clicking the installer’s icon or file name in the download location.
  2. Follow the instructions provided by the Installation wizard.

The private JRE installed with the JDK is not registered. To register the JRE, you must set the PATH environment variable to point to JAVA_HOME bin , where JAVA_HOME is the location where you installed the private JRE . See Setting the PATH Environment Variable.

By default, the Java Access Bridge is disabled. To enable it, see Enabling and Testing Java Access Bridge in the Java Platform, Standard Edition Java Accessibility Guide .

To access essential Java information and functions in Microsoft Windows 7 and Windows 10 machines, after installation, click the Start menu and then select Java . The Java directory provides access to Help, Check for Updates, and Configure Java.

The Microsoft Windows 8 and Windows 8.1 do not have a Start menu. However, the Java information is available in the following Start directory: %ALLUSERSPROFILE%MicrosoftWindowsStart MenuPrograms .

Windows Registry Settings

The installation program for the Microsoft Windows version of the Java SE Runtime Environment uses the registry to store path and version information.

It creates the following registry keys:

This key contains the string CurrentVersion , with a value that is the highest installed version on the system.

JavaHome : the full path name of the directory in which the JRE is installed

RuntimeLib : the full path name of the Java runtime DLL

HKEY_LOCAL_MACHINESoftwareJavaSoftJava Web Start

This key is created for Java Web Start.

If there are two versions of JDK or JRE installed on a system, one with the new version-string format introduced in JDK 10 , and the other with the older version format, then there will be two different CurrentVersion registry key values. For example, if JDK 1.8.0 and JDK 10 are installed, then the following registry keys are created:

«HKEY_LOCAL_MACHINESOFTWAREJavaSoftJava Development Kit» for JDK 1.8.0 and «HKEY_LOCAL_MACHINESOFTWAREJavaSoftJDK» for JDK 10 .

The registry layout for this example is:

The @CurrentVersion is a registry string in the «JDK» or «Java Development Kit» key.

For the same example, if the JRE is installed, then the registry layout is:

The @CurrentVersion is a registry string in the «JRE» or «Java Runtime Environment» key.

Beginning to Use the JDK

Use the Java item in the Windows Start menu to access essential Java information and functions, including Help, API documentation, the Java Control Panel, checking for updates, and Java Mission Control.

Java Start Menu Installed by JDK

During JDK install, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java Development Kit folder is created in the Windows Start menu, which contains the following items:

Reference Documentation : Opens the Online API documentation web page.

Java Mission Control : Opens the Java Mission Control profiling and diagnostics tools suite.

Java Mission Control is a commercial feature available to users with a Java SE Advanced license.

During JDK installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JDK version on the system

The Windows 7 and Windows 10 have a Start menu; however, the menu is not available in Windows 8 and Windows 8.1. The JDK and Java information in Windows 8 and Windows 8.1 is available in the following Start directory: %ALLUSERSPROFILE%MicrosoftWindowsStart MenuPrograms .

Java Start Menu Installed by JRE

During JRE installation, Java menu items are added to the Windows Start menu to provide easy access to Java resources and a Java folder is created in the Windows Start menu, which contains the following items:

About Java : Opens the Java Control Panel with focus on the General tab. The tab displays the latest JRE version installed on the system.

Check for Updates : Opens the Java Control Panel with focus on the Update tab

Configure Java : Opens the Java Control Panel with focus on the General tab

Get Help : Opens the Java Help Center

Visit Java.com : Opens the Java Download page

During JRE installation and uninstallation processes, the appropriate start menu items are updated so that they are associated with the latest JRE version on the system.

The Windows 7 and Windows 10 have Start menu, however the menu is not available in Windows 8 and Windows 8.1. The JRE and Java information in Windows 8 and Windows 8.1 is available in the following Start directory: %ALLUSERSPROFILE%MicrosoftWindowsStart MenuPrograms .

Java Web Start

Java Web Start is an application-deployment technology that gives you the power to run full-featured applications with a single click from your web browser.

With Java Web Start, you can download and run applications, such as a complete spreadsheet program or an internet chat client, without going through complicated installation procedures. With Java Web Start, you run applications simply by clicking a web page link. If the application is not present on your computer, Java Web Start automatically downloads all necessary files. It then caches the files on your computer so that the application is always ready to be run anytime that you want — either from an icon on your desktop or from the browser link. No matter which method you use to run the application, the most current, available version of the application is always presented to you.

Upgrading from Previous Versions

If you have a previous version of Java Web Start, do not uninstall it. Uninstalling it will cause the download cache to be cleared, and all previously installed Java Web Start application data will have to be downloaded again. The new version will write over previous installations and automatically update browsers to use the new version. The configuration files and the program files folder used by Java Web Start have changed, but all your settings will remain intact after the upgrade because Java Web Start will translate your settings to the new form.

The only way to uninstall Java Web Start is to uninstall the JDK or JRE. Uninstalling the JDK or JRE will not, however, remove the cache for previous versions of Java Web Start. Previous releases have separate uninstallation instructions for Java Web Start.

You may see a misleading message if you do the following:

Download and cache a Java Web Start application with the JDK or JRE.

Remove the JDK or JRE using Add or Remove Programs from the Windows Control Panel .

Remove the Java Web Start application using Add or Remove Programs .

When you remove the application, you see an Uninstaller Error dialog box saying:

An error occurred while trying to remove Java-Application: name App. It may have already been uninstalled. Would you like to remove Java-Application: name App from the Add or Remove program list?

If you say Yes to this, then you will see another Uninstaller Error dialog box saying:

You do not have sufficient access to remove Java-Application: name App from the Add or Remove Program list. Please contact your system administrator.

The message is displayed when you have removed the Java Web Start application while uninstallating the JDK or JRE, but this is not reflected in the Add or Remove Programs . Refresh the Add or Remove Programs by pressing F5 or reopen the panel.

To avoid seeing the misleading message, either press F5 or reopen the dialog box. Any Java Web Start application that was downloaded and cached with the JDK or JRE will no longer appear in the list of currently installed programs.

Java Plug-in

Java Plug-in technology, included as part of the JRE, establishes a connection between popular browsers and the Java platform. This connection enables applets on websites to be run within a browser on the desktop.

The Java Plug-in is automatically enabled for supported web browsers during installation of the JRE. No user intervention is necessary.

In Java SE 10 , the version of the Java Plug-in that is available in versions of the JRE prior to Java SE 6 Update 10 has been deprecated. However, this earlier version of the Java Plug-in is still shipped with Java SE 10 for compatibility purposes but is no longer fully supported. It will be removed in a future release.

Option to Disable the JRE Out-of-Date Warning

When the installed JRE falls below the security baseline or passes its built-in expiration date, an additional warning is shown to users to update their installed JRE to the latest version. For businesses that manage the update process centrally, users attempting to update their JRE individually, may cause problems.

A deployment property, deployment.expiration.check.enabled is available that can be used to disable the JRE out of date warning. To suppress this specific warning message, add the following entry in the deployment properties file:

To disable automatic updates, on the Update tab of the Java Control Panel, deselect the Check for Updates Automatically check box.

Uninstalling the JDK on Windows

Uninstalling the JRE on Windows

Use either of the following ways to uninstall JRE:

Go to Add/Remove Programs utility in the Microsoft Windows Control Panel and uninstall the older versions of JRE.

Remove JRE using the online Java Uninstall Tool.

The Java Removal Tool is integrated with the JRE installer. After JRE 10 is installed, the Java Removal Tool provides the list of outdated Java versions in the system and helps you to remove them.

The Java Uninstall tool will not run if your system administrator specified a deployment rule set in your organization.

A deployment rule set enables enterprises to manage their Java desktop environment directly and continue using legacy business applications in an environment of ever-tightening Java applet and Java Web Start application security policies. A deployment rule set enables administrators to specify rules for applets and Java Web Start applications; these rules may specify that a specific JRE version must be used. Consequently, the Java Uninstall tool will not run if it detects a deployment rule set to ensure that no required JREs are uninstalled.

See Deployment Rule Set in the Java Platform, Standard Edition Deployment Guide .

JDK Installation Troubleshooting

The following sections provide tips for working around problems that are sometimes seen during or while following installation instructions.

System Error During Decompression

If you see the error message system error during decompression , then you might not have enough space on the disk that contains your TEMP directory.

Program Cannot Be Run in DOS Mode

If you see the error message This program cannot be run in DOS mode , then do the following:

Open the MS-DOS shell or command prompt window.

Right-click the title bar.

Select the Program tab.

Ensure that the item Prevent MS-DOS-based programs from detecting Windows is not selected.

Select OK again.

Exit the MS-DOS shell.

Restart your computer.

Source Files in Notepad

In Microsoft Windows, when you create a new file in Microsoft Notepad and then save it for the first time, Notepad usually adds the .txt extension to the file name. Therefore, a file that you name Test.java is actually saved as Test.java.txt . Note that you cannot see the .txt extension unless you turn on the viewing of file extensions (in Microsoft Windows Explorer, deselect Hide file extensions for known file types under Folder Options ). To prevent the .txt extension, enclose the file name in quotation marks, such as «Test.java» when entering information in the Save As dialog box.

Characters That Are Not Part of the System Code Page

It is possible to name directories using characters that are not part of the system locale’s code page. If such a directory is part of the installation path, then generic error 1722 occurs, and installation is not completed. Error 1722 is a Windows installer error code. It indicates that the installation process has failed. The exact reason for this error is not known at this time.

To prevent this problem, ensure that the user and system locales are identical, and that the installation path contains only characters that are part of the system locale’s code page. User and system locales can be set in the Regional Options or Regional Settings control panel.

The associated bug number is 4895647.

Windows Online Installation and Java Update FAQ

These are frequently asked questions about JDK 10 and JRE 10 online installation and Java updates on Windows computers.

1. I downloaded the installer and it is less than 1 megabyte. Why is it so small?

The Windows Online Installer for the JRE will download more installer files. Using this installer helps users to avoid downloading unnecessary files.

2. I had the Java Control Panel open for Java Update and the About tab showed the version of the JRE installed in my computer. Then I ran Java Update, and the version of the JRE that the Java Control Panel is showing has not changed. Why is this?

You need to close and restart the Java Control Panel to get the updated Control Panel.

3. Netscape/Mozilla is not working correctly with Java Plug-in. Why?

First, close all the browsers sessions. If this does not work, reboot the system and try again.

4. I try to install on the D: drive and Java Update is still installing files onto the C: drive. Why?

Regardless of whether an alternate target directory was selected, Java Update needs to install some files on the Windows system drive.

5. How can I uninstall the Java Update version that I just installed?

If you want to uninstall the JRE, then use the Add/Remove Programs utility in the Microsoft Windows . Select the Control Panel and then Add/Remove Programs .

6. After the JRE bootstrap installer is downloaded and executed, why does the message «This installer cannot proceed with the current Internet Connection settings of your system. In your Windows Control Panel, please check Internet Options -> Connections to make sure the settings and proxy information are correct.» appear?

The JRE bootstrap installer uses the system Internet Connection settings to connect to the web for downloading extra files. If you are behind a firewall and require proxy settings, then ensure that the proxy settings in Internet Options/Internet Properties are set up properly (select Start , then Control Panel , then Internet Options/Internet Properties , then Connections , and then LAN Settings ). If you can browse the external web (for example, outside the firewall) with Internet Explorer, then your proxy settings are properly set up. The installer does not understand the proxy settings specified in Netscape/Mozilla.

7. I found the jusched.exe process running in the background of my system after installing JRE. Is there a way to shut it down?

The jusched.exe is the scheduler process of Java Update. This process runs automatically. To shut in the Java Control Panel on the Update tab, deselect the Check for Updates Automatically check box.

8. When I click the Update Now button from the Java Control Panel, it complains about the system being «offline.» What does that mean?

Java Update can be run only if the system is connected to the network. A system that is not connected to the network is referred to as being offline. When the Update Now is clicked, it will check the online/offline status of your system. If your computer does not have internet access, then the error message is displayed. Check that your system is currently connected to the internet and try again.

9. I followed the instructions to install a specific version of the JRE. After the installation, a message is displayed from system tray saying an update is available for download. What should I do?

The message is part of the Java Auto Update mechanism, which detects at user login time if a newer version of the JRE is available for download. In the system tray, click the Java Update icon to download and install the update.

10. I encountered the error «This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.» when running the Java SE installer.

There are several possible reasons for this error to be displayed; a few are listed:

Network connection fails.

Download manager software interrupts the download process.

Another application, such as an antivirus application, may interrupt the installation process.

To address these problems, ensure that the third-party downloader applications are turned off and the network connection is configured properly. Also, if a proxy is in use, then ensure that the proxy authentication is turned off.

11. I encountered the error «Error 1722. There is a problem with this Windows installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.»

See Error 1722: Problem with Windows Installer Package. If you encounter any other errors or issues, then you can access Java Help Center, which contains solutions for issues that you might encounter when downloading and installing Java on your system. In particular, you can search for solutions by error number. Searching for «Error 1722» returns a solution to this issue.

Понимать и управлять настройками Java в Windows 10/8/7

Adobe Flash и Java – это две загрузки, которые большинство из нас установили на наших компьютерах с Windows, поскольку они дают нам больше возможностей для работы в Интернете и просмотра веб-страниц. Мы уже видели, как управлять настройками Adobe Flash .

Сегодня мы узнаем о настройках Java в Windows 10/8/7.

Что такое Java

Java – это язык программирования и вычислительная платформа, которая поддерживает самые современные программы, включая утилиты, игры и бизнес-приложения. Он позволяет играть в онлайн-игры, общаться с людьми по всему миру, просматривать изображения в 3D и многое другое.

Панель управления Java

Программное обеспечение Java или среда выполнения Java также называются средой выполнения Java, средой выполнения, средой выполнения, JRE, виртуальной машиной Java и т. Д. Им можно управлять из панели управления Java. Чтобы получить доступ к панели управления Java, откройте панель управления и нажмите «Java». Здесь вы сможете получить информацию о номере версии, а также просмотреть файлы.

Удалить временные файлы Java

Когда вы просматриваете Интернет, всякий раз, когда ваш браузер использует Java, файлы Java хранятся в специальных папках для более быстрого выполнения в дальнейшем.

Чтобы просмотреть местоположение папки и другие сведения, нажмите кнопку Настройки .

По умолчанию эти временные файлы Java хранятся в

C: Users Имя пользователя AppData LocalLow Sun Java Deployment кэш

папка в формате JAR. Вы можете установить уровень сжатия для этих файлов JAR и даже установить сумму, которая будет выделена для хранения этих файлов.

Вы можете просмотреть файлы, нажав кнопку Просмотр .

Чтобы удалить эти временные файлы JAR Java, нажмите Удалить файлы . Теперь вы можете выбрать, какие файлы вы хотите удалить, и нажмите кнопку ОК.

Очистить кеш Java с помощью командной строки

Чтобы очистить кэш Java с помощью командной строки, откройте окна командной строки, введите следующую команду и нажмите Enter:

Обновление Java

Мы склонны игнорировать обновление нашей Java. Но очень важно, чтобы мы всегда были уверены, что вы используете последнюю версию Java, поскольку уязвимости в Java часто используются для компрометации вашего компьютера. Последняя версия Java содержит важные улучшения для повышения безопасности, производительности и стабильности приложений Java, которые работают на вашем компьютере. Всякий раз, когда дыры в безопасности обнаруживаются, они исправляются, и поэтому обязательно убедитесь, что у вас установлена ​​последняя версия java, поскольку она включает исправления уязвимостей.

Вы можете настроить параметры обновления Java, нажав на вкладку Обновить .

Убедитесь, что Автоматически проверять наличие обновлений . Нажав на кнопку Дополнительно , вы сможете установить частоту проверок обновлений.

Кстати, я заметил, что прошло много времени с тех пор, как я обновил Java. Поэтому я нажал на Обновить сейчас , чтобы начать процесс обновления. Это запустит процесс juscheck.exe , который проверит наличие обновлений и, соответственно, проинформирует вас.

Нажав на кнопку «Установить», вы начнете процесс обновления. По завершении нажмите «Закрыть».

Другие настройки Java

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

Вкладка Безопасность позволяет просматривать типы сертификатов, позволяющие идентифицировать себя.

На вкладке Дополнительно можно настроить другие параметры.

Удалить старые версии Java

Хранение старых и неподдерживаемых версий Java в вашей системе представляет серьезную угрозу безопасности.

Более старые версии SunJava (до JRE 6 с обновлением 7) действительно сохранялись при установке обновлений и должны быть удалены, так как более старые версии SunJava очень уязвимы для Winfixer/Vundo. С 2005 года вплоть до обновления в конце прошлого года до обновления 10 JRE 6 для SunMicrosystems и Sun Microsystems, чтобы автообновление SunJava удаляло предыдущие (уязвимые) версии программы. Обновления от JRE 6 Update 10 forward находятся в автономной папке «jre6», которая перезаписывается, если установлена ​​новая JRE. Даже при использовании самой последней версии SunJava, если на вашем компьютере все еще находятся более ранние, уязвимые версии, они уязвимы для заражения.К сожалению, простое использование программ «Установка и удаление программ» для удаления старых версий неэффективно.

Мы предлагаем вам попробовать JavaRa. После обновления Java до его последней версии сегодня я запустил JavaRa и использовал его для удаления старых версий Java.

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

ПРИМЕЧАНИЕ. Мой коллега по MVP и мод Corrine TWCF добавляет: JavaRa не была обновлена ​​для поддержки удаления JRE 7 и, по-видимому, фактически имеет проблемы после JRE 6u32. Он перешел на SingularLabs.com. Кроме того, Пол Маклейн больше не поддерживает JavaRa, а Фриде Фрис все еще поддерживает.

Java Скачать

Вы можете скачать и установить Java для Windows вручную с Java.com здесь.

Надеюсь, вы узнали что-то новое здесь, в этом посте. Если у вас есть что добавить, пожалуйста, сделайте это в разделе комментариев.

Содержание

  • 1 1. Где взять Java?
  • 2 2. Какую версию выбрать?
  • 3 3. Что устанавливать, JRE или JDK?
  • 4 4. Установка Java
  • 5 5. Настройка переменных окружения
  • 6 6. Удаление лишних файлов
  • 7 Скачать Java x64, x32 для Windows
  • 8 Установить Java на компьютер
  • 9 Как обновить Java
  • 10 Как узнать версию Java
  • 11 Java Application Blocked
  • 12 Как очистить кеш Java
  • 13 Старые версии Java для Windows
  • 14 Как удалить Java в Windows

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

Поэтому я решил описать процедуру установки Java для операционной системы Windows и последующей настройки системы, потому что, к сожалению, недостаточно просто “запустить инсталлятор и всегда нажимать кнопку Next”.

1. Где взять Java?

На официальном сайте Oracle Java.

2. Какую версию выбрать?

Разумеется, последнюю доступную (на момент написания инструкции это Java 8).

Выбирая из 32-битной и 64-битной версий, берите 64-битную, если ваша операционная система это позволяет, потому что у неё менее строгие ограничения по памяти, доступной исполняемым Java-приложениям.

3. Что устанавливать, JRE или JDK?

Java Runtime Environment, или JRE — это виртуальная машина, позволяющая запускать приложения, написанные на языке программирования Java.

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

Правило очень простое: если вы собираетесь что-нибудь писать на языке программирования Java, значит вам потребуется JDK. А если только запускать готовые программы — тогда достаточно JRE.

4. Установка Java

Вот тут, действительно, всё просто — нужно запустить инсталлятор и следовать указаниям визарда. Можно просто всё время нажимать кнопку Next.

5. Настройка переменных окружения

К сожалению, инсталлятор Java не выполняет настройку переменных окружения, поэтому придётся сделать это вручную после установки.

Во-первых, необходимо установить переменную JAVA_HOME, которая должна указывать на директорию, в которую установлена Java. Многие программы используют эту переменную, чтобы определить, где находится Java.

Во-вторых, надо в переменную PATH добавить путь к директории %JAVA_HOME%bin. Эта переменная указывает операционной системе список директорий, в которых нужно искать исполняемые файлы, и чтобы можно было запускать Java из консоли, переменная PATH должна быть правильно настроена.

Для установки переменных окружения сначала нужно открыть свойства компьютера, либо использовав сочетание клавиш Win-Pause, либо через меню “Пуск”:

properties.png

Затем нужно выбрать “Дополнительные параметры системы”, в открывшемся диалоге перейти на вкладку “Дополнительно” и нажать кнопку “Переменные среды”, после чего появится диалог настройки переменных окружения.

environment.png

Если у вас уже есть переменная окружения JAVA_HOME — надо её отредактировать, если нет — создать новую. В качестве значения нужно указать путь к директории, куда установлена Java, то есть, например c:Program FilesJavajdk1.8.0_25, если вы установили JDK, либо c:Program FilesJavajre1.8.0_25, если вы установили только JRE.

После того, как вы установили значение переменной JAVA_HOME, необходимо отредактировать значение переменной PATH, добавив туда путь к директории, где находятся исполняемые файлы Java, то есть %JAVA_HOME%bin

path.png

И сохранить всё это, закрыв все открытые диалоги в обратном порядке кнопками OK.

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

После того, как вы изменили переменные окружения, новые значения будут действительны только для новых запускаемых программ, уже запущенные программы не узнают о том, что переменные окружения поменялись. Поэтому если вы, например, пытались запустить Java из консоли и у вас не получилось из-за неправильных настроек переменной PATH, вам придётся перезапустить консоль после того, как вы поменяли значение переменной.

6. Удаление лишних файлов

Запустите консоль (cmd) и выполните в ней команду where java.

В результате вы должны увидеть путь к исполняемому файлу java.exe, который операционная система должна успешно обнаружить в том месте, куда вы установили Java. Если файл не нашёлся — значит неправильно настроена переменная PATH и нужно вернуться к предыдущему пункту.

Однако иногда бывает и наоборот, находятся «лишние» исполняемые файлы:

Происходит это из-за того, что инсталлятор Java вместо того, чтобы правильно настроить переменные окружения, пытается положить исполняемые файлы в директорию C:Windowssystem32

Это не очень хорошо — засоряется системная директория, может возникнуть рассогласование версий Java (в разных директориях разные версии). Поэтому надо удалить из каталога C:Windowssystem32 исполняемые файлы java.exe, javaw.exe и javaws.exe, если они там обнаружатся.

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

Как вы знаете, Java — один из самых популярных языков программирования в мире и его знание существенно увеличит вашу значимость как программиста. Итак, вы решили начать писать на этом языке. Вам понадобится поставить JDK для того, чтобы писать и запускать программы на Java. JDK — набор софта, разработанного Oracle, содержащий в себе компилятор (javac), среду выполнения (Java Runtime Environment), стандартную библиотеку языка, примеры и документацию. Прочитав эту статью, вы узнаете, как установить и настроить JDK на своей системе, что такое среда разработки и какие варианты IDE существуют для Java. Также вы напишете свою первую программу на Java.

Установка Java Development Kit

  1. Перейдите на сайт Oracle и загрузите JDK для вашей платформы.
  2. После загрузки извлеките полученный архив и запустите извлеченное приложение.
  3. В процессе установке выберите вариант «Development Tool» и нажмите «Next».
  4. Спустя некоторое время установка завершится.

Итак, вы установили Java Development Kit, но это еще не всё. Необходимо настроить его для вашей системы.

Настройка JDK на примере Windows

  1. Перейдите в папку %ProgramFiles%Java%версия установленного вами jdk%bin, нажмите на свойства любого файла в этой папке и скопируйте путь к нему.
  2. Перейдите в свойства вашего компьютера, откройте вкладку «Дополнительно», нажмите «Переменные среды…». В открывшемся окне создайте новую переменную, назовите её Path, в её значение вставьте скопированный ранее путь.
  3. Теперь самое важное. Откройте командную строку и наберите javac, чтобы убедиться, что JRE установлен и настроен. Если выдаётся список аргументов к команде javac, то поздравляю, вы успешно установили и настроили всё, что необходимо для использования Java!

После установки JDK и JRE не помешает установить на компьютер одну из IDE.

Установка IDE

Для начала разберёмся, что такое IDE.

IDE(Integrated Development Environment) – это комплекс программных средств, используемый программистами для разработки программного обеспечения. IDE позволяет с лёгкостью писать, запускать, отлаживать и тестировать код.

Для написания сложных программ целесообразно использовать IDE. Мы рассмотрим наиболее популярные.

Блокнот

Да, и в блокноте можно писать код! Для разработки вам потребуется всего лишь установить JDK и указать путь к ней. Пишете код в блокноте, компилируете с помощью командной строки. Тем не менее, для разработки сложных программ это не самый лучший вариант из-за отсутствия каких-либо дополнительных возможностей, присутствующих в продвинутых IDE.

NetBeans

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

  • форматирование кода;
  • установка сторонних библиотек;
  • простой графический интерфейс;
  • и многое, многое другое…

Eclipse

Eclipse, как и Netbeans — одна из наиболее популярных IDE. Она предоставляет впечатляющий интуитивно понятный интерфейс и производительную среду разработки, позволяющую комфортно разрабатывать приложения на Java. Скачать Eclipse можно бесплатно с официального сайта. Преимущества:

  • возможность форматировать код так, как вам удобно;
  • поддержка разбиения кода на модули;
  • лёгкость использования одного и того же кода в разных проектах;
  • перетаскивание (drag-and-drop);
  • просмотр содержимого библиотек;
  • удобный интерфейс.

IntelliJ IDEA

IntelliJ IDEA — известная IDE для Java, написанная, как ни странно, на Java. Укомплектована уникальными инструментами и позволяет без проблем ориентироваться в программе. Нахождение ошибок и отладка кода никогда не были такими легкими, как с IntelliJ IDEA.

JCreator

JCreator — продвинутая и самая быстрая IDE для Java, написанная на C++.

Пишем свою первую программу

Итак, вы установили и настроили JDK, JRE и IDE для Java. Каков следующий шаг? Конечно же, написать программу, чтобы окончательно убедиться, что всё работает и вы готовы к изучению языка. Вы познакомитесь с базовой структурой кода на Java и создадите свою первую программу! Стоит отметить, что перед изучением Java следует ознакомиться хотя бы с самыми простыми принципами объектно-ориентированного программирования.

Структуру программы на Java можно представить так:

Структура программы на Java

В файле с исходным кодом содержится несколько классов — это части программы, имеющие определённые функции. Хорошей практикой считается разбиение программы на несколько файлов с исходным кодом, каждый со своим назначением. В классах содержатся методы — действия, которые могут выполнять объекты данного класса. В методе содержатся команды, с помощью которых вы можете получить желаемый результат.

Java разработчик

Banks Soft Systems, Москва, Санкт-Петербург, Ижевск, Самара, Обнинск, Тольятти, до 250 000 ₽

tproger.ruВакансии на tproger.ru

Перед тем, как приступить к созданию программы, необходимо создать проект, а в нём и файл, в котором будет содержаться ваш код. Рассмотрим создание проекта на IDE Eclipse, но в остальных IDE процесс отличается не сильно. Cверху выберите «File», затем наведите курсор на «New», в открывшемся меню выберите «Java Project». В появившемся окне введите имя проекта и другие нужные вам настройки (если не уверены, что делать, то можно просто оставить все как есть) и нажмите «Next». Готово, вы создали проект! Осталось лишь создать в нём класс, в котором вы напишете свою первую программу. Щёлкните правой кнопкой мыши по вашему проекту (он должен появиться справа) и выберите «New» → «Class». Присвойте новому классу имя (в данном примере – это first) и нажмите «Finish».

Приступим к написанию вашей первой программы. По традиции — это программа, выводящая на экран «Hello, world!».

 public class first{       public static void main(String args[])       {           System.out.println("Hello, world!");       }   }

Разберём по частям написанное нами:

  • public – это модификатор доступа, определяющий, из какой части программы может использоваться наш класс. В вашем примере public — это весь код;
  • class – ключевое слово, показывающее, что вы объявляете класс, а не что-либо иное;
  • first – имя вашего класса. Круглые скобки определяют начало и конец кода класса;
  • public static void main(String args[]) – объявление публичного статического метода (то есть который можно вызвать, не создавая объект класса). Метод в примере ничего не возвращает и принимает в качестве аргументов массив строк. Единственная команда в этом методе выводит в консоль сообщение «Hello, world!». Заметьте, вместо println можно написать print, разница лишь в том, что в случае с println дополнительно выведется символ переноса строки.

Хорошо, вы написали вашу первую программу. Теперь её надо запустить. Для этого просто нажмите белую стрелочку в зеленом кружке на верхней панели (при наведении курсора на неё должно высветиться «Run»). После нажатия внизу откроется консоль, в которой вы увидите сообщение “Hello, world”! Поздравляю, вы написали вашу первую программу на Java и готовы погрузиться в увлекательный мир этого языка!

Вот несколько ресурсов, которые помогут вам в изучении Java:

  • документация Oracle по стандартной библиотеке языка;
  • уроки по Java от Oracle;
  • теория объектно-ориентированного программирования;
  • хорошая книга-самоучитель;
  • большое количество интересных и полезных статей про Java на русском языке.

Не смешно? А здесь смешно: @ithumor

Содержание:

Скачать Java x64, x32 для Windows

Приложение Java 8 Update 221 x32 [66,32 МБ] (автономный установщик);

Приложение Java 8 Update 221 x64 [75,92 МБ] (автономный установщик).

Это самая последняя версия 8 обновление 191 от 16 октября 2018 года, по ссылкам вы скачаете Java с сайта java.com.

Если вдруг скачать программу Java для Windows, с официального сайта по ссылкам выше не получается, мы продублировали их:

Скачать Java 8 Update 191 x32 с нашего сайта (автономный установщик);

Скачать Java 8 Update 191 x64 с нашего сайта (автономный установщик).

Установить Java на компьютер

Выберите автономный установщик программы необходимой разрядности (x32 или x64) для Windows из предыдущего пункта. Появится диалоговое окно загрузки файла.

Выберите местонахождения папки. (Сохраните файл в определенном месте на вашем компьютере, например, на рабочем столе), затем нажмите кнопку ‘Сохранить’.

Закройте все приложения (в том числе браузер).

Чтобы запустить процесс установки, двойным щелчком откройте сохраненный файл.

Согласитесь с разрешением на внесение изменение на компьютере, нажав Да.

Нажмите Install для начала установки Java на компьютер.

Нажмите OK в окне Изменений в лицензионном соглашении.

Окно прогресса установки программы.

Сообщение об обнаружении устаревшей версии Java на вашем компьютере. Компания настоятельно рекомендует не использовать устаревшие версии приложения. Нажимаем Uninstall, для удаления предыдущих установленных версий.

Сообщение о успешном удалении старых версий. Если Java не смогла самостоятельно удалить старые версии и процесс установки завершился ошибкой, перейдите ниже к пункту удаление Java с компьютера вручную.

Процесс установки Java завершен.

Теперь вы можете использовать приложения Java на вашем компьютере.

Как обновить Java

Существует два варианта обновления Java: ручной и автоматический.

Для ручного обновления вы удаляете текущую версию Java, скачиваете и устанавливаете новую версию.

Для автоматического обновления Java запускаем Check For Updates из папки Java в меню Пуск.

Соглашаемся с внесением изменений.

В открывшемся окне Панели управления Java нажимаем на кнопку Update Now. И если доступна более новая версия Java, появляется окно Java Setup -Welcome с указанием номера новейшей версии. Нажимаем в нем кнопку Update.

Появляется окно загрузки дистрибутива новой версии.

После чего, сменяется на окно установки обновленной версии Java.

Через некоторое время (в зависимости от производительности вашего компьютера) появляется сообщение о успешной установке последней версии Java.

На этом процесс автоматического обновления завешен.

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

Как узнать версию Java

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

В списке установленных программ меню Пуск, находим пункт Java и открываем About Java.

В появившемся окне About Java будет указана текущая версия установленного приложения.

Второй способ заключается в использовании командной строки Windows.

Нажмите сочетание Windows+R, в появившемся окне Выполнить напишите cmd и нажмите клавишу Enter.

В открывшемся окне командной строки Windows введите команду java -version и нажмите Enter.

Полученный результат указывает, что на компьютере используется Java версии 9 Update 191.

Java Application Blocked

Одна из частых ошибок на сайтах использующих апплеты: Application Blocked by Java Security — отсутствие специальных разрешений  для выполнения Java приложения на определенном сайте.Исправление ошибки будет добавление сайта указанного в строке Location в список сайтов исключений, в панели управления Java.

Открываем меню Пуск, в списке установленных программ раскрываем папку Java и запускаем ConfigureJava.В Панели управления переходим на вкладку Security. Нажимаем на Edit Site List и c помощи кнопки Add добавляем в новую строку необходимый нам полный адрес сайта указанный в строке Location.

Адрес указываем полностью, если указан номер порта (в примере 80), указываем его так же. Нажимаем кнопку OK, после чего в списке Exception Site List добавится нужный адрес.

Нажимаем ОК,  выходим из Панели управления Java.

Перезапускаем браузер, пробуем запустить апплет на сайте.

Если адрес сайта в Список исключений Java был добавлен без ошибок, то окно Application Blocked больше не появляется.

Как очистить кеш Java

Для очистки кеша откройте Панель управления Java, для этого в меню Пуск, в списке установленных программ раскрываем папку Java и запускаем ConfigureJava.

На основной вкладке General, в разделе Temporary Internet Files нажимаем кнопку Settings. В открывшемся окне хранилища временных файлов нажимаем Delete Files. В окне Delete Files and Applications выбираем все доступные пункты и нанимаем кнопку OK.

Кеш приложений Java успешно очищен, теперь очищаем кеш разрешений безопасности.

Переходим на вкладку Security, щелкаем по кнопке Restore Security Promts и в появившемся окне подтверждения нажимаем на Restore All.

После чего Панель управления Java можно закрывать.

Кеш Java успешно очищен, все данные и используемые апплеты будут загружены заново.

Старые версии Java для Windows

Некоторым приложениям и играм, для работы требуется старая версия Java или какие-то предыдущие апдейты.

Список популярных предыдущих версий приложения:

скачать Java 8 Update 45

  • версия x64 (64 bit) автономный установщик;
  • версия x32 (32 bit) автономный установщик.

скачать Java 7 Update 80

  • версия x64 (64 bit) автономный установщик;
  • версия x32 (32 bit) автономный установщик.

 скачать Java 7 Update 45

  • версия x64 (64 bit) автономный установщик;
  • версия x32 (32 bit) автономный установщик.

Если вам требуются еще какие-то устаревшие версии приложения, напишите в комментариях и мы добавим ссылки на скачивание.

Как удалить Java в Windows

Рассмотрим три способа удаления установленной  программы с компьютера:

  1. Через Удаление программ Windows;
  2. Утилитой JavaUninstallTool;
  3. Полное удаление вручную.

Удалить Java через Удаление программ Windows

Для удаления программы могут потребоваться права администратора.

Windows 10

Щелкните по кнопке Пуск правой клавишей мыши и выберите Приложения и возможности.

Выберите программу для удаления и нажмите ее кнопку Удалить.

Ответьте на запросы, чтобы завершить удаление

Windows 8

В меню «Пуск» введите Панель управления в окне поиска. Выберите Панель управления.

При отображении панели управления выберите Удаление программы из категории программ.

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

Ответьте на запросы, чтобы завершить удаление.

Windows 7

Откройте меню Пуск и выберите Панель управления.

Выберите Программы и пункт Программы и компоненты.

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

Удаление Java с помощью утилиты

Утилита Java Uninstall Tool:

На экране отображаются обнаруженные версии Java, которые можно удалить;

Пользователь может на свой выбор удалить все или некоторые версии Java;

Работает в операционных системах Windows;

Позволяет обнаружить и удалить версии Java 1.4.2 и выше;

Обнаруживаются только версии Java, установленные с помощью программы установки Java. Если Java идет в комплекте с любым приложением, использующим свою собственную программу установки, эта версия Java не будет доступна для удаления.

Программа распространяется бесплатно, скачать последнюю версию программы удаления для Windows, можно с официального сайта по ссылке ниже:

Скачать приложение Java Uninstall Tool [1,15 МБ] — это самая последняя версия 1.1.0.0 от 2 мая 2018 года. По ссылке вы скачаете программу с сайта java.com.

Если вдруг скачать JavaUninstallTool с официального сайта по ссылке выше не получается, мы продублировали ее: можно скачать JavaUninstallTool с нашего сайта.

Двойным щелчком запустите скачанный файл и разрешите внесение изменений нажав Да.

Нажмите кнопку Agree на стартовом коне программы и в появившемся окне подтверждения нажмите Да.

Откроется список установленных и доступных для удаления версий  Java. Отметьте галочками версии приложения для удаления и нажмите кнопку Next. В появившемся окне подтверждения удаления нажмите Да.

При удалении старых версий Java, рекомендуется очистить кеш приложения, это поможет избежать проблем сохранение и использования настроек или устаревших версий апплетов на сайтах, нажимаем Да.

Запускается процесс удаления выбранных версий Java.  Все указанные версии Java успешно удалены , нажимаем Close.

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

Удаление Java вручную

Полное удаление Java вручную заключается в удалении служебных папок настроек и очистке реестра Windows, в случаях, когда приведенные выше способы не дали результата (предварительно обязательно попробуйте стандартные методы удаления Java).

Удаление стандартных папок Java

Удалите папку Java из папки Program Files или Program Files (x86).

Удаление папок Java из профиля пользователя

Удалите папки Sun и Oracle (если они присутствуют) из папок LocalLow и Roaming.

Папки LocalLow и Roaming по-умолчанию скрыты и находятся в папке приложений пользователя AppData. Для нахождения данной папки нажмите сочетание клавиш Windows+R или в меню Пуск нажмите кнопку Выполнить. В открывшемся окне введите appdata , после чего нажмите кнопку ОК. Последовательно откройте папки LocalLow и Roaming. Удалите папки Sun и Oracle (если они присутствуют).

Удаление папки Java из реестра Windows

Удалите папку JavaSoft из разделов HKEY_CURRENT_USERSoftware и HKEY_LOCAL_MACHINESOFTWARE.

Откройте редактор реестра, нажмите сочетание клавиш Windows+R или в меню Пуск нажмите кнопку Выполнить. В открывшемся окне введите regedit, после чего нажмите кнопку ОК.

Раскрываем раздел HKEY_CURRENT_USER, папка Software. Находим и удаляем папку JavaSoft.

Точно так же, удаляем папку JavaSoft из раздела HKEY_LOCAL_MACHINE папка SOFTWARE.

После удаления служебных папок Java и разделов JavaSoft реестра Windows перезагрузите компьютер.

На этом полное удаление Java с компьютера пользователя успешно завершено.

Используемые источники:

  • http://barancev.github.io/how-to-install-java-on-windows/
  • https://tproger.ru/articles/start-writing-in-java/
  • https://skachat-java.ru/

Понравилась статья? Поделить с друзьями:
  • Как установить java jdk 64 bit на windows 10
  • Как установить java home windows 10
  • Как установить java 64 bit на windows 10 для майнкрафт
  • Как установить jar файл на windows
  • Как установить jagged alliance 2 на windows 10