Как выбрать java по умолчанию windows

I'm in the situation where I've installed the JDK, but I can't run applets in browsers (I may not have installed the JRE). However, when I install the JRE, it clobbers my JDK as the default runtim...

I just had that problem (Java 1.8 vs. Java 9 on Windows 7) and my findings are:

short version

default seems to be (because of Path entry)

c:ProgramDataOracleJavajavapathjava -version

select the version you want (test, use tab completing in cmd, not sure what those numbers represent), I had 2 options, see longer version for details

c:ProgramDataOracleJavajavapath_target_[tab]

remove junction/link and link to your version (the one ending with 181743567 in my case for Java 8)

rmdir javapath
mklink /D javapath javapath_target_181743567

longer version:

Reinstall Java 1.8 after Java 9 didn’t work. The sequence of installations was jdk1.8.0_74, jdk-9.0.4 and attempt to make Java 8 default with jdk1.8.0_162…

After jdk1.8.0_162 installation I still have

java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

What I see in path is

Path=...;C:ProgramDataOracleJavajavapath;...

So I checked what is that and I found it is a junction (link)

c:ProgramDataOracleJava>dir
 Volume in drive C is OSDisk
 Volume Serial Number is DA2F-C2CC

 Directory of c:ProgramDataOracleJava

2018-02-07  17:06    <DIR>          .
2018-02-07  17:06    <DIR>          ..
2018-02-08  17:08    <DIR>          .oracle_jre_usage
2017-08-22  11:04    <DIR>          installcache
2018-02-08  17:08    <DIR>          installcache_x64
2018-02-07  17:06    <JUNCTION>     javapath [C:ProgramDataOracleJavajavapath_target_185258831]
2018-02-07  17:06    <DIR>          javapath_target_181743567
2018-02-07  17:06    <DIR>          javapath_target_185258831

Those hashes doesn’t ring a bell, but when I checked

c:ProgramDataOracleJavajavapath_target_181743567>.java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

c:ProgramDataOracleJavajavapath_target_185258831>.java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

so to make Java 8 default again I had to delete the link as described here

rmdir javapath

and recreate with Java I wanted

mklink /D javapath javapath_target_181743567

tested:

c:ProgramDataOracleJava>java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

** update (Java 10) **

With Java 10 it is similar, only javapath is in c:Program Files (x86)Common FilesOracleJava which is strange as I installed 64-bit IMHO

.java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

Вопрос:

У меня машина Windows 10 x64. У меня был Open JDK 10. Мой JAVA_HOME указывает на местоположение Open JDK 10. Моя переменная Path имеет %JAVA_HOME%/bin; часть.

Затем я установил Java 8. https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Установщик Java меняет Path.

 C:Usersuser>set Path
Path=C:Program Files (x86)Common FilesOracleJavajavapath;OTHER_STUFF_WITHOUT_JAVA

Теперь в командной строке java -version указывает на Java 8.

 C:Usersuser>java -version
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

Но JAVA_HOME по-прежнему указывает на Open JDK 10.

C:Usersuser>set java_home
JAVA_HOME=C:Javajdkjdk-10.0.2

Моя цель – использовать Open JDK-10 в качестве Java по умолчанию.

Это не повторяющийся путь Java по умолчанию на машинах Windows, потому что для меня нет ответа.

Лучший ответ:

(Оставить комментарий как ответ на удобочитаемость)

Самый простой способ иметь несколько JDK и обязательно указывать на хороший, это избегать использования установщиков java. Вы должны просто разархивировать JDK в папке, а затем соответственно изменить ваши JAVA_HOME и PATH. У вас также может быть несколько JAVA_HOME, таких как JAVA_HOME_8 и JAVA_HOME_10, указывающих на их соответствующую папку JDK, и установите свой JAVA_HOME =% JAVA_HOME_10%, чтобы вы могли легко изменить.

Ответ №1

Самый простой способ, который я только что узнал, заключается в том, что установщик java 8 создает новую запись PATH среды:

C:Program Files (x86)Common FilesOracleJavajavapath

Это будет указывать на последнюю установленную JRE или JDK (т.е. последнюю в JDK или JRE) с использованием метода установщика.

Поэтому, если ваш JAVA_HOME указывает на JDK 10 ИЛИ JRE 10, просто перейдите в Переменные среды и удалите:

C:Program Files (x86)Common FilesOracleJavajavapath

Из переменной PATH.

Тогда значения, которые вы использовали для JAVA_HOME, вступят в силу.

Это сработало для меня после установки Java 8, и я установил Java 12

Содержание

  1. Как я могу изменить версию среды выполнения Java в Windows (7)?
  2. 8 ответов:
  3. Изменить Java виртуальная машина по умолчанию на Windows 7
  4. Как изменить версию Java Runtime в Windows (7)?
  5. 8 ответов
  6. Windows игнорирует JAVA HOME: Как установить JDK по умолчанию?
  7. 12 ответов
  8. Как установить среду установки / выполнения Java по умолчанию (Windows)?
  9. 9 ответов
  10. Как это установить:
  11. РЕДАКТИРОВАТЬ: из Windows Vista вы можете использовать mklink /J default JRE_1.8
  12. Переключение между различными версиями JDK в Windows
  13. 3 ответов

Как я могу изменить версию среды выполнения Java в Windows (7)?

Как я могу изменить версию Java Runtime в Windows.

Я установил Java 7 для некоторых тестов, и теперь мне нужен старый java6 в качестве системного значения по умолчанию, но я не хочу удалять Java 7 (мне это нужно для более поздних тестов). Могу ли я изменить систему-используется JRE на вкладке панель управления/Java/JRE? Я могу изменить/изменить/добавить / удалить пользовательскую версию, но не системную.

8 ответов:

вы можете, конечно, переопределить настройку пути или даже обойтись без нее, явно указав путь к java.exe / javaw.exe в вашей командной строке или определении ярлыка.

если вы используете апплеты от браузер или, возможно, также Java Web Start applications (они выглядят как приложения, поскольку у них есть собственное окно, но вы запускаете их из браузера), выбор JRE определяется набором параметров реестра:

дополнительные ключи реестра создаются с помощью этой схемы:

т. е. один для крупных и один дополнительный номер версии. Каждый из этих ключей имеет такие значения (примеры показано):

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

поскольку версии Java меняются довольно часто, теперь есть » мастер «под названием» Панель управления Java » для ручного переключения версии Java Вашего браузера. Это работает для IE, Firefox и, вероятно, других, таких как Opera и Chrome: это апплет «Java» в Windows» System Settings приложение. Вы можете выбрать любой из установленных JREs. Я верю, что волшебник возится с этими записями в реестре.

если вы похожи на меня и» удалили «старые версии Java, просто уничтожив каталоги, вы также найдете эти» призраки » среди вариантов; поэтому убедитесь, что JRE, который вы выбираете, соответствует неповрежденной установке Java!

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

. и некоторые полезные сведения о поддержке нескольких версий:

я использую для работы на UNIX-подобных машинах, но недавно мне пришлось сделать некоторую работу с Java на машине Windows 7. У меня была эта проблема, и это я ее решил. Он работал правильно для меня, поэтому я надеюсь, что он может быть использован для тех, кто может иметь эту проблему в будущем.

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

Изменить Java виртуальная машина по умолчанию на Windows 7

предположим, что мы установили Java 8, но по какой-то причине мы хотим сохранить Java 7.

1-Запустите cmd от имени администратора

5-cd в это и создает следующие ссылки:

6-cd out и создать ссылку на каталог javapath указывая на нужный javapath. Например: mklink /D javapath javapath_1.7

7-Откройте регистр и измените ключ HKEY_LOCAL_MACHINESOFTWAREJavaSoftJava Runtime EnvironmentCurrentVersion иметь значение 1.7

9-и как только это будет сделано:

начиная с Java 1.6, java.exe устанавливается в %windir%system32, который поддерживает параметр командной строки «- version». Вы можете использовать это, чтобы выбрать конкретную версию для запуска, например:

запускает приложение jar в java 1.7, если оно установлено.

Как только я обновил свою версию Java до 8, как это было предложено браузером. Однако я выбрал для удаления предыдущей версии Java 6, которую я использовал для кодирования своих проектов. Когда я ввожу команду в «Java-версия» в cmd Он показал 1.8, и я не мог запустить Eclipse IDE на Java 1.6.

когда я установил обновление Java 8 для браузера, он изменил системную переменную «PATH», добавляя » C:ProgramDataOracleJavajavapath-с самого начала. Недавно добавленный путь указал на Java vesion 8. Поэтому я удалил этот путь из системной переменной «PATH», и все работало нормально. 🙂

все, что вам нужно сделать, это установить переменную среды PATH в Windows, чтобы указать, где ваш каталог java6 bin вместо каталога java7.

щелкните правой кнопкой мыши Мой компьютер > дополнительные системные настройки > дополнительно > Переменные среды

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

убедитесь, что ссылка на java / bin обновлена в «Path»; это может быть автоматически, если у вас есть JAVA_HOME или эквивалентный набор. Если JAVA_HOME установлен, просто обновите его, чтобы ссылаться на более старую установку JRE.

Если вы используете windows 10 или windows server 2012, шаги для изменения версии среды выполнения java следующие:

Источник

Как изменить версию Java Runtime в Windows (7)?

Как я могу изменить версию Java Runtime в Windows.

Я установил Java 7 для некоторых тестов, и теперь мне нужен старый java6 по умолчанию, но я не хочу удалять Java 7 (мне это нужно для более поздних тестов). Могу ли я изменить систему-used JRE на вкладке панель управления/Java/JRE? Я могу изменить/изменить/добавить / удалить используемую пользователем версию, но не используемую системой.

8 ответов

вы можете, конечно, переопределить параметр пути или даже обойтись без него, явно указав путь к java.ехе / javaw, который.exe в командной строке или определении ярлыка.

если вы используете апплеты от браузер или, возможно, также Java Web Start приложения (они выглядят как приложения, поскольку у них есть собственное окно, но вы запускаете их из браузера), выбор JRE определяется набором настроек реестра:

дополнительные ключи реестра создаются с помощью этой схемы:

т. е. один для крупных и один дополнительный номер версии. Каждый из этих ключей имеет такие значения (примеры показано):

. и ваш браузер будет искать эти настройки, чтобы определить, какой JRE для запуска.

поскольку версии Java меняются довольно часто, теперь есть » мастер «под названием» Панель управления Java » для ручного переключения версии Java Вашего браузера. Это работает для IE, Firefox и, вероятно, других, таких как Opera и Chrome: это апплет «Java» в Windows» System Settings app. Вы можете выбрать любой из установленных JREs. Я верю этому волшебнику. возится с этими записями в реестре.

если вы похожи на меня и» удалили «старые версии Java, просто уничтожив каталоги, вы найдете эти» призраки » среди вариантов тоже; поэтому убедитесь, что JRE, который вы выбираете, соответствует неповрежденной установке Java!

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

. и некоторая полезная информация о поддержке нескольких версий:

Источник

Windows игнорирует JAVA HOME: Как установить JDK по умолчанию?

Как убедить Windows использовать JDK вместо JRE?

этот вопрос был задан раньше, здесь и в другом месте:

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

Я предполагаю, что это проблема, характерная для 1.7, и Windows 7 делает то, что не должно с реестром.

есть идеи о том, как это исправить?

редактировать: Упс. Я написал «первая запись в пути к классам» выше, когда я имел в виду «путь». Извиняюсь.

12 ответов

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

копия java.exe выполнить с помощью PATH переменные среды. Если вы не предпримете шаги, чтобы изменить это, по умолчанию копия будет найдена в каталоге Windows. Поскольку эта копия не находится в каталоге Java runtime, она находит ее, просматривая реестр.

в Windows 8 может потребоваться удалить C:ProgramDataOracleJavajavapath справочник.

это решило мою проблему.

у меня тоже есть эта проблема. Я запускаю 1.6, но хочу создать код, над которым я работаю с 1.5. Я изменил JAVA_HOME и PATH (как пользователь, так и система) безрезультатно.

надеюсь, что это помогает!

CLASSPATH также не имеет ничего общего с Windows. Для Windows это только переменная среды, которая расширяется до расположения папки.

у меня была та же проблема. У меня установлена куча версий Java, и по какой-то причине Java 1.7 использовался вместо Java 1.6, хотя я указал в пути для использования 1.6 (C:jdk1.6.0_45_32bin).

мне пришлось переместить путь JDK, который я хотел использовать (1.6), чтобы быть первой записью в переменной среды PATH, чтобы убедиться, что Windows использует 1.6 вместо 1.7.

Так, например, переменная среды PATH раньше была:

и после Я переместил jdk, чтобы быть первым, он работал:

Я думаю, что установщик Windows Java 1.7 установил его в какой-то другой каталог уже в пути, таким образом, сначала используется вместо указанной записи пользовательского пути C:jdk1.6.0_45_32bin;

Я удалил этот текст из Пути, где мой путь уже имеет %JAVA_HOME%bin С ним.

теперь переменная ‘JAVA_HOME’ контролирует мою версию Java, которую я хотел.

У меня были установлены Java 7 и 8, и я хочу перенаправить на java 7, но версия java в моем окне командной строки cmd показывает Java 8.
Добавлен путь к каталогу Java 7 bin (C:Program файлыJavajdk1.7.0_10bin) к переменной PATH в конце, но не получилось и показывает Java 8. Поэтому я изменил путь Java 7 на начало значения пути, и это сработало.
Открыл новое окно командной строки cmd и проверил мою версию java, и теперь он показывает Java 7

установите переменную среды Path в нужный каталог jdk/bin

в моем случае у меня были установлены Java 7 и 8 (оба x64), и я хочу перенаправить на java 7, но все настроено на использование Java 8. Java использует переменную среды PATH:

в качестве первого варианта поиска своей папки runtime (является скрытой папкой). Этот путь содержит 3 символические ссылки, которые нельзя редактировать.

на моем ПК переменная среды PATH выглядит следующим образом:

в моем случае, это должно выглядеть так:

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

протестировано на Win7 x64.

3b9005bcde5fb0bde2ac150f58720b50предположим, что вы установили JDK 10 после JDK 8 и в системной переменной среды задали путь типа «C:ProgramDataOracleJavajavapath» тогда управление версиями Java по этому пути. он будет игнорировать JAVA_HOME даже путь JDK 1.8, установленный здесь Так что уберите «C:ProgramDataOracleJavajavapath» в пути, чтобы получить эффект JAVA_HOME path

здесь есть дополнительный фактор; в дополнение к исполняемым файлам java, которые установка java помещает туда, куда вы попросите их поместить, в windows, установщик java также помещает копии некоторых из этих исполняемых файлов в каталог Windows system32, поэтому вы, вероятно, будете использовать, который каждый исполняемый файл java был установлен совсем недавно.

Источник

Как установить среду установки / выполнения Java по умолчанию (Windows)?

Я нахожусь в ситуации, когда я установил JDK, но я не могу запускать апплеты в браузерах (возможно, я не установил JRE).

Однако, когда я устанавливаю JRE, он уничтожает мой JDK как среду выполнения по умолчанию. Это ломает почти все (Eclipse, Ant), поскольку им требуется серверная JVM.

9 ответов

В Windows это немного неудобно. Вот что я делаю.

Я исправил поведение моего ярлыка запуска eclipse в диалоговом окне свойств

Альтернативой является постоянная установка параметра в файле инициализации eclipse.

У меня только что была эта проблема (Java 1.8 против Java 9 в Windows 7), и мои выводы таковы:

короткая версия

По умолчанию кажется (из-за ввода пути)

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

Удалите соединение / ссылку и ссылку на вашу версию (та, которая заканчивается на 181743567 в моем случае для Java 8)

более длинная версия:

После установки jdk1.8.0_162 у меня все еще есть

То, что я вижу на пути, это

Итак, я проверил, что это, и обнаружил, что это перекресток (ссылка)

Эти хэши не звонят, но когда я проверил

Поэтому, чтобы снова установить Java 8 по умолчанию, мне пришлось удалить ссылку, как описано здесь

И воссоздать с помощью Java, которое я хотел

** обновление (Java 10) **

С Java 10 это похоже, только javapath находится в c: Program Files (x86) Common Files Oracle Java , что странно, поскольку я установил 64-разрядную версию IMHO

После многих попыток я обнаружил, что подход к перекрестку более удобен. Это очень похоже на то, как эта проблема решается в Linux.

По сути, он состоит из ссылки между c:toolsjavadefault и фактической версией java, которую вы хотите использовать по умолчанию в своей системе.

Как это установить:

Это создаст соединение (которое более или менее похоже на символическую ссылку в Linux) между C:toolsjavadefault и C:toolsjavaJRE_1.6

Если затем вам нужно изменить Java по умолчанию на версию 1.8, вам просто нужно выполнить

Тогда у вас могут быть командные файлы для этого без командной строки, например set_jdk8.bat set_jdk7.bat

По предложению @ СӏаџԁеМаятіи

РЕДАКТИРОВАТЬ: из Windows Vista вы можете использовать mklink /J default JRE_1.8

Я просто устанавливаю все необходимые мне версии JDK, и последняя установленная становится по умолчанию, поэтому при необходимости я просто переустанавливаю ту, которую хочу использовать по умолчанию.

Необходимо удалить C: Program Files (x86) Common Files Oracle Java javapath из среды и заменить на JAVA_HOME, который отлично подходит для меня

R5uBI

4wNXb

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

Источник

Переключение между различными версиями JDK в Windows

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

Я нашел 2 способа, которые должны решить эту проблему, но это не работает.

первым решением является создание файлов bat, как это:

и после запуска этой летучей мыши я вижу правильную версию Java. Но когда я закрываю этот CMD и открываю новый и набираю » java-версия» он говорит, что у меня все еще есть 1.8.0_25. Так что это не работает.

второе решение, которое я нашел-это приложение этой сайт. И это тоже не работает. Тот же эффект, что и в первом решении.

3 ответов

на /m опция используется для установки переменной в системе (и не только для текущего пользователя). Для использования этой опции терминал должен быть запущен от имени администратора.

существует также несколько редакторов переменных среды в качестве альтернативы громоздким настройкам переменных среды Windows. См.»есть ли удобный способ редактирования пути в Windows 7?» по супер Пользователь.

Если ваш путь имеет менее 1024 символов, можно выполнить (запуск от имени администратора) этот скрипт:

Если более 1024, попробуйте удалить некоторые ненужные пути или можете изменить эти сценарии с некоторыми входными данными из https://superuser.com/questions/387619/overcoming-the-1024-character-limit-with-setx

теперь вы можете переключаться между Java версия с использованием (должен быть запущен с правами администратора):

(Примечание: в конце строки нет двойной кавычки и не должно быть или вы получите c:Program FilesJavajdk-10.0.1» в своем JAVA_HOME переменная и она ломает ваш PATH переменной)

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

Источник

Я сделал следующее:

1. Установите переменную окружения JAVA_HOME:

2. Добавьте Java 1.6.0_45 и отключите Java 1.8.0_66 в настройках среды выполнения Java в разделе Настройка Java:

К сожалению, Java все еще 1.8.0_66:

>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

Может ли кто-нибудь предложить совет по этому вопросу?

Редактировать:

Согласно предложению Дэвида, следующее — это связанное с Java содержимое из вывода команды PATH (весь вывод очень длинный, я надеюсь, что для этого вопроса достаточно следующего).

PATH=C:ProgramDataOracleJavajavapath; ... C:Program FilesJavajdk1.6.0_45bin

java -version использует неверную версию Java.

Диагностика:

>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

Ниже приведено связанное с Java содержимое из вывода PATH:

PATH=C:ProgramDataOracleJavajavapath; ... C:Program FilesJavajdk1.6.0_45bin

Заключение:

Из приведенного выше вывода мы можем вывести, что C:ProgramDataOracleJavajavapath равен 1.8.0_66 .

Вам нужно изменить PATH чтобы сначала поместить C:Program FilesJavajdk1.6.0_45bin .

Я заметил, что после проверки пути в соответствии с вашим предложением. Windows 10 не позволяет мне редактировать путь, потому что он говорит: «Эта переменная среды слишком велика». Я знаю, что должен быть другой вопрос, чтобы иметь дело с этим отдельно.

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

ответ дан DavidPostill106k

Это НАСТОЯЩИЙ активный исполняемый файл JAVA в вашей переменной PATH:

C:Program Files (x86)Common FilesOracleJavajavapath;

Удалите его, и система примет значение от

...;%JAVA_HOME%bin;

ответ дан Robot Model 6751

Проверьте также реестр. Нажмите клавишу Win-R, введите regedit . Найдите ComputerHKEY_LOCAL_MACHINESOFTWAREJavaSoftJava Runtime Environment . Если есть что-то другое, чем вы ожидаете, то лучше переустановить Java. Если это невозможно, очень осторожно измените настройки. Имейте в виду, что от версии к версии настройки могут отличаться. В моем случае я бы понизил версию Java 1.9 до 1.8.

Настройка реестра Java

Как вы можете проверить переменную javapath в системной переменной пути к среде.

Так что если вы хотите использовать свою собственную версию.Ты можешь сделать

  • 1) Создать новую переменную в системной переменной
  • 2) Назовите его как JAVA_HOME и укажите путь установки jdk
  • 3) добавьте эту переменную в путь и переместите ее наверх.
  • 4) проверить версию Java

вам нужно создать JAVA_HOME

У меня та же проблема, я установил JAVA_HOME:

C:Program FilesJavajdk1.7.0_75

и Path к:

%JAVA_HOME%bin

Мне нужно запустить JDK 7. Когда я запускаю java -version всегда появляется jdk 8.

Я решил это с помощью: в System Environment -> Path -> order %JAVA_HOME%bin to first.

ответ дан Tarmizi Hamid11

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 здесь.

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

Как убедить Windows использовать JDK вместо JRE?

этот вопрос был задан раньше, здесь и в другом месте:

Как установить установку/время выполнения Java по умолчанию (Windows)?

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

когда я запускаю java -version из командной строки вместо вызова моей установки JDK 1.6, он работает 1.7 JRE.

Я предполагаю, что это проблема, характерная для 1.7, и Windows 7 делает то, что не должно с реестром.

есть идеи о том, как это исправить?

редактировать: Упс. Я написал «первая запись в пути к классам» выше, когда я имел в виду «путь». Извиняюсь.

12 ответов


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

копия java.exe выполнить с помощью PATH переменные среды. Если вы не предпримете шаги, чтобы изменить это, по умолчанию копия будет найдена в каталоге Windows. Поскольку эта копия не находится в каталоге Java runtime, она находит ее, просматривая реестр.

Итак, вам либо нужно изменить реестр, либо поставить версию Java вам хочу!—9—>до каталог Windows в PATH.


в Windows 8 может потребоваться удалить
C:ProgramDataOracleJavajavapath
справочник.

по пути

это решило мою проблему.


у меня тоже есть эта проблема. Я запускаю 1.6, но хочу создать код, над которым я работаю с 1.5. Я изменил JAVA_HOME и PATH (как пользователь, так и система) безрезультатно.

ответ заключается в том, что установщик за 1.6 java.exe, javaw.exe и javaws.exe в свою WindowsSystem32 папка (Windows 7).

я решил это, переименовав эти файлы в java_wrong.exe, javaw_wrong.exe и javaws_wrong.exe. Только после этого он выбирает правильную версию java, как определено в JAVA_HOME и PATH. Я переименовал файлы таким образом, потому что это удалило их легко обратимым образом.

надеюсь, что это помогает!


Windows ничего не игнорирует. Это проблема с вашей установки; Windows просто использует то, что вы предоставляете. Он не имеет специальных знаний JAVA_HOME.

CLASSPATH также не имеет ничего общего с Windows. Для Windows это только переменная среды, которая расширяется до расположения папки.

Проверьте %PATH% переменные среды. Это то, что заставляет окна находить одно перед другим. Путь (как сказал пост, на который вы ссылались) должен указывать на %JAVA_HOME%bin;<remainder of path>. Опять же, сообщение, на которое вы ссылались, дало вам возможность установить это с помощью пакетного файла.

(для тех, кто может этого не знать: Самый простой способ проверить %PATH% — открыть командную строку и ввести echo %PATH%. Вы также можете попасть, нажав правой кнопкой мыши на Computer в правой панели меню «Пуск» и выберите Properties, потом Advanced System Settings, и tne .)


у меня была та же проблема. У меня установлена куча версий Java, и по какой-то причине Java 1.7 использовался вместо Java 1.6, хотя я указал в пути для использования 1.6 (C:jdk1.6.0_45_32bin).

мне пришлось переместить путь JDK, который я хотел использовать (1.6), чтобы быть первой записью в переменной среды PATH, чтобы убедиться, что Windows использует 1.6 вместо 1.7.

Так, например, переменная среды PATH раньше была:

C:Program Files (x86);...<other entries>;C:devant181bin;C:jdk1.6.0_45_32bin

и после Я переместил jdk, чтобы быть первым, он работал:

C:jdk1.6.0_45_32bin;C:Program Files (x86);...<other entries>;C:devant181bin

Я думаю, что установщик Windows Java 1.7 установил его в какой-то другой каталог уже в пути, таким образом, сначала используется вместо указанной записи пользовательского пути C:jdk1.6.0_45_32bin;

6

автор: eternalminerals.com


для моего случая в 'Path' переменная был добавлен параметр типа’C:ProgramDataOracleJavajavapath;‘.
Это место имело java.exe, javaw.exe и javaws.exe из java 8, который недавно установлен через jdk.exe от Oracle.

Я удалил этот текст из Пути, где мой путь уже имеет %JAVA_HOME%bin С ним.

теперь переменная 'JAVA_HOME' контролирует мою версию Java, которую я хотел.

2

автор: Muhammadh Aadhil


У меня были установлены Java 7 и 8, и я хочу перенаправить на java 7, но версия java в моем окне командной строки cmd показывает Java 8.
Добавлен путь к каталогу Java 7 bin (C:Program файлыJavajdk1.7.0_10bin) к переменной PATH в конце, но не получилось и показывает Java 8. Поэтому я изменил путь Java 7 на начало значения пути, и это сработало.
Открыл новое окно командной строки cmd и проверил мою версию java, и теперь он показывает Java 7


установите переменную среды Path в нужный каталог jdk/bin


в моем случае у меня были установлены Java 7 и 8 (оба x64), и я хочу перенаправить на java 7, но все настроено на использование Java 8. Java использует переменную среды PATH:

C:ProgramDataOracleJavajavapath

в качестве первого варианта поиска своей папки runtime (является скрытой папкой). Этот путь содержит 3 символические ссылки, которые нельзя редактировать.

на моем ПК переменная среды PATH выглядит следующим образом:

C:ProgramDataOracleJavajavapath;C:WindowsSystem32;C:Program
ФайлыJavajdk1.7.0_21bin;

в моем случае, это должно выглядеть так:

C:WindowsSystem32;C:Program файлыJavajdk1.7.0_21bin;

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

после установки переменных среды JAVA_HOME и JRE_HOME в нужную java время выполнения папок (в моем случае это Java 7), команда java -version должен показывать желаемую среду выполнения java. Я замечаю, что нет необходимости возиться с реестром.

протестировано на Win7 x64.


enter image description hereпредположим, что вы установили JDK 10 после JDK 8 и в системной переменной среды задали путь типа «C:ProgramDataOracleJavajavapath» тогда управление версиями Java по этому пути. он будет игнорировать JAVA_HOME даже путь JDK 1.8, установленный здесь
Так что уберите «C:ProgramDataOracleJavajavapath» в пути, чтобы получить эффект JAVA_HOME path


здесь есть дополнительный фактор; в дополнение к исполняемым файлам java, которые установка java помещает туда, куда вы попросите их поместить, в windows, установщик java также помещает копии некоторых из этих исполняемых файлов в каталог Windows system32, поэтому вы, вероятно, будете использовать, который каждый исполняемый файл java был установлен совсем недавно.


на всякий случай, если вы используете .Файл BAT как служба Windows, я бы предложил удалить службу Windows и переустановить ее снова после изменения %JAVA_HOME%, чтобы указать правильную версию Java..


У меня только что была эта проблема (Java 1.8 против Java 9 в Windows 7), и мои выводы таковы:

укороченная версия

по умолчанию кажется (из-за ввода пути)

c:ProgramDataOracleJavajavapathjava -version

выберите нужную версию (протестируйте, используйте завершение табуляции в cmd, не знаю, что представляют собой эти числа), у меня было 2 варианта, см. более длинную версию для подробностей

c:ProgramDataOracleJavajavapath_target_[tab]

удалите соединение / ссылку и ссылку на вашу версию (та, которая заканчивается на 181743567 в моем случае для Java 8)

rmdir javapath
mklink /D javapath javapath_target_181743567

более длинная версия:

Переустановите Java 1.8 после того, как Java 9 не работает. Последовательность установки была jdk1.8.0_74, jdk-9.0.4 и попытка сделать Java 8 по умолчанию с jdk1.8.0_162 …

После установки jdk1.8.0_162 у меня все еще есть

java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

То, что я вижу на пути, это

Path=...;C:ProgramDataOracleJavajavapath;...

Итак, я проверил, что это, и обнаружил, что это перекресток (ссылка)

c:ProgramDataOracleJava>dir
 Volume in drive C is OSDisk
 Volume Serial Number is DA2F-C2CC

 Directory of c:ProgramDataOracleJava

2018-02-07  17:06    <DIR>          .
2018-02-07  17:06    <DIR>          ..
2018-02-08  17:08    <DIR>          .oracle_jre_usage
2017-08-22  11:04    <DIR>          installcache
2018-02-08  17:08    <DIR>          installcache_x64
2018-02-07  17:06    <JUNCTION>     javapath [C:ProgramDataOracleJavajavapath_target_185258831]
2018-02-07  17:06    <DIR>          javapath_target_181743567
2018-02-07  17:06    <DIR>          javapath_target_185258831

Эти хэши не звонят, но когда я проверил

c:ProgramDataOracleJavajavapath_target_181743567>.java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

c:ProgramDataOracleJavajavapath_target_185258831>.java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

поэтому, чтобы снова сделать Java 8 по умолчанию, мне пришлось удалить ссылку, как описано здесь

rmdir javapath

и воссоздать с помощью Java, которое я хотел

mklink /D javapath javapath_target_181743567

проверено:

c:ProgramDataOracleJava>java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

** обновление (Java 10) **

С Java 10 это похоже, только javapath находится в c: Program Files (x86) Common Files Oracle Java , что странно, поскольку я установил 64-разрядную версию IMHO

.java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

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

Как установить Java для windows

Чтоб установить Java на свой компьютер, первое, что вам нужно, — это сама Java, то есть все библиотеки кода и технологии, которые делают работу Java-программы.

Затем вам нужно скачать NetBeans — программное обеспечение, которое вы будете использовать для написания своего кода.

Как установить Java? Выполните следующие шаги:

  1. Перейдите на страницу веб-сайта Oracle.
  2. Выберите последнюю версию Java и нажмите кнопку Oracle JDK Скачать.

    oracle java

  3. Примите лицензионное соглашение на веб-сайте Oracle и выбрать свою операционную систему (для Windows это 32- или 64-разрядная версия).

    выбор windows oracle

  4. Скачайте файл с расширением .exe
  5. Запустите скачанный файл и, следуя инструкции, установите Java на свой компьютер.

    windows установка java

    windows установка java финиш

  6. Дальше необходимо настроить переменную окружения. Перейдите в Панель управления > Система и безопасность > Система.

    windows дополнительные параметры

  7. В разделе «Дополнительные параметры системы» выберите «Переменные среды», как показано ниже.

    windows переменные среды

  8. Теперь вам нужно изменить переменную «Path», чтобы она содержала путь к среде Java. Выберите ее и нажмите кнопку «Изменить», как показано ниже.

    переменные среды path

  9. По умолчанию java устанавливается в папку «C:Program FilesJavajdk-версия программыbin» или «C:Program Files (x86)Javajdk-версия программыbin». Если вы установили Java в другом месте, добавьте к нему путь.

    путь к java изменение системной переменной

  10. Нажмите OK, сохраните настройки и все готово! Теперь, чтобы проверить правильность установки, откройте командную строку и введите javac -version. Вы увидите, что Java работает на вашем компьютере.

    измененные переменные среды командная строка java

  11. Чтобы убедиться, что компилятор настроен, введите в командной строке javac. Вы увидите список, связанный с программой Javac.

После того, как вы установили Java, следующим шагом является установка NetBeans.

Установить или вернуться к предыдущей версии Java — Windows

  1. Сначала откройте панель управления. …
  2. Когда появится панель управления, выберите «Приложения» на экране настроек Windows.
  3. Прокрутите вниз и выберите Java (только более новую версию, если у вас их несколько), например, Java 8 Update 171, на экране «Приложения и функции», а затем нажмите кнопку «Удалить».

25 мар. 2016 г.

Как мне загрузить старую версию Java 8?

Установить старую версию java

  1. Шаг 1. Перейдите к URL-адресу загрузки JDK >> Прокрутите вниз и найдите Архив Java >> Нажмите «Загрузить».
  2. Шаг 2. Архивы Java разделены по версиям 1,5,6,7,8. …
  3. Шаг 3: Прокрутите вниз и выберите конкретную версию, которую хотите загрузить; Я выбрал Java SE Development Kit 8u60.
  4. Шаг 4:…
  5. Шаг 5:…
  6. Шаг 6:…
  7. Шаг 7:…
  8. Step8:

Как установить Java по умолчанию в Windows?

Как установить это:

  1. Загрузите соединение и обязательно поместите его в переменную среды PATH.
  2. Настройте среду следующим образом: — ПУТЬ, указывающий ТОЛЬКО на этот jre c: toolsjavadefaultbin — JAVA_HOME, указывающий на `c: toolsjavadefault.

16 ян. 2012 г.

Java 1.8 — это то же самое, что Java 8?

javac -source 1.8 (это псевдоним для javac -source 8) java.

Могу ли я установить 2 версии Java?

10 ответов. Абсолютно возможно установить рядом несколько версий JRE / JDK. … Вы можете изменить это или переменную JAVA_HOME, или создать определенные файлы cmd / bat для запуска желаемых приложений, каждое с разными путями JRE в пути.

Как мне перейти на более раннюю версию Java в Linux?

1 Ответ

  1. Вам необходимо установить openjdk-8-jre: sudo apt-get install openjdk-8-jre.
  2. Затем переключитесь на версию jre-8: $ sudo update-alternatives –config java Для альтернативной java есть 2 варианта (предоставление / usr / bin / java).

12 апр. 2019 г.

Могу ли я установить старую версию Java?

Перейдите на страницу загрузки архива Java SE 8 Oracle и найдите нужную версию Java. Пример: если вы хотите установить Java 8 Update 60, найдите поле с надписью Java SE Runtime Environment 8u60. Если у вас есть вопросы о том, какую версию Java установить, обратитесь в службу технической поддержки.

Могу ли я скачать старые версии Java?

Как я могу скачать более старую версию Java? Посетите страницу загрузки архива Java, чтобы получить другие версии Java. Мы рекомендуем установить последнюю версию Java с сайта java.com.

Какая последняя версия Java?

Последняя версия Java — Java 16 или JDK 16, выпущенная 16 марта 2021 года (следуйте этой статье, чтобы проверить версию Java на своем компьютере). JDK 17 находится в процессе сборки с ранним доступом и станет следующим JDK LTS (долгосрочная поддержка).

Нужна ли Windows 10 Java?

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

Как мне перейти на более раннюю версию Java в Windows?

Информация

  1. Шаг 1. Удалите текущую версию Java. Доступ к панели управления: в Windows 7 нажмите кнопку Windows, затем выберите Панель управления. …
  2. Шаг 2: Установите желаемую версию Java. Перейдите на страницу загрузки архива Java SE 8 Oracle и найдите нужную версию Java.

16 июн. 2017 г.

Как изменить версию Java в Windows?

7 ответы

  1. Пуск -> Панель управления -> Система -> Дополнительно.
  2. Щелкните Переменные среды, в разделе Системные переменные найдите ПУТЬ и щелкните по нему.
  3. В окнах редактирования измените PATH, добавив в начало расположение каталога jdk5 / bin. …
  4. Закройте окно.
  5. Снова откройте окно командной строки и запустите java -version.

Какая версия Java лучше?

Java SE 8 остается предпочтительным производственным стандартом в 2019 году. Хотя были выпущены и 9, и 10, ни один из них не будет предлагать LTS. С момента своего первого выпуска в 1996 году Java сохранила репутацию одного из самых безопасных, надежных и платформенно-независимых языков для компьютерного программирования.

В чем разница между Java 7 и Java 8?

Java 7 обеспечивает поддержку JVM для языков с динамической типизацией, а также взаимодействие типов для создания универсального экземпляра. В Java 8 появилась самая ожидаемая функция языка программирования под названием «Лямбда-выражения», новая языковая функция, которая позволяет пользователям кодировать локальные функции в качестве аргументов метода.

Почему Java 8 так популярна?

Версия с долгосрочной поддержкой (LTS)

Одна из основных причин, по которой Java 8 по-прежнему так популярна, заключается в том, что это версия LTS (или долгосрочной поддержки). … С коммерческой точки зрения ни одной организации не следует рассматривать запуск системы в производство, основанной на версии Java, не имеющей LTS.

Понравилась статья? Поделить с друзьями:
  • Как выбрать iphone в списке сетевых служб в настройках windows 10
  • Как выбрать dlna сервер под windows
  • Как выбрать com порт на ноутбуке windows 10
  • Как выбрать 64 битную систему при установке windows
  • Как выбрать 144 гц в windows 10