как установить java на mac os

Как установить Java JDK на Mac OS

В этой статье показано, как установить Java JDK на Mac OS, менеджер пакетов Homebrew, ручную установку и переключение между различными версиями JDK.

В этой статье показано, как установить Java JDK на Mac OS, менеджер пакетов Homebrew, ручную установку и переключение между различными версиями JDK.

P.S На момент написания статьи последней версией JDK GA является JDK15, а сборка раннего доступа – JDK16.

Примечание Начиная с macOS 10.15 Catalina, оболочка терминала по умолчанию переключается с втулки (Борн – снова снаряд) к зш (Оболочка Z). И мы должны переместить все сценарии запуска и переменные среды в

1. Доморощенный установить последнюю версию Java на Mac OS

1.3 информация о заваривании для отображения деталей формулы.

Формула java всегда содержит последнюю версию Java JDK (OpenJDK) Версия GA; на момент написания статьи последней версией GA является JDK15.

Формула java11 содержит версию Java 11 LTS.

1.4 заварите установку java для установки последней версии JDK 15.

2. Доморощенный установить Java 8 на Mac OS

2.4 Мы можем использовать формулу openjdk@8 для установки Java 8 на macOS.

2.5 openjdk@8 также является только для бочонка ; нам нужно создать символическую ссылку, чтобы оболочка macOS java могла ее найти.

2.7 Что делать, если у нас установлено несколько версий Java?

3. Доморощенный установите указанную Java (примите OpenJDK) в Mac OS.

3.2 Поиск по теме adoptopenjdk формула.

3.3 Мы выбираем adoptopenjdk14 формулу для установки JDK 14.

3.4 Формула adopt openjdk создает домашний каталог JDK непосредственно в /Библиотеке/Java/Javavirtualmachines/|/.

4. Ручная установка Java (сборки раннего доступа) на macOS.

По некоторым причинам нам необходимо установить Java на macOS вручную:

P.S На момент написания статьи сборка JDK для раннего доступа – это JDK 16.

4.2 Извлекает загруженный tar.gz файл в /Библиотеку/Java/Javavirtualmachines

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

Из приведенного выше примера с 1 по пример 4 мы установили ваши версии JDK на macOS.

5.1 Перечислите все версии JDK на macOS.

5.2 Добавьте нижеприведенную функцию в

/.zshrc (для mac OS 10.15 Catalina и выше) или

/.bashrc (до mac OS 10.15 Catalina).

/.zshrc если его не существует.

/.zshrc для отражения изменений.

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

Источник

Java для MacOS – установка и обновление

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

Для чего Java нужна на Mac OS

Из-за того что на Mac виртуальная машина Java не устанавливается по умолчанию, у многих пользователей возникает вопрос: а нужна ли она вообще?

Многие сервисы и популярные пакеты Adobe работают в среде виртуальной машины Джава. Не говоря уже о знаменитой игре Minecraft. Но даже если вы не играете в игры на Mac и впервые слышите о Майнкрафте, то при установке офисного пакета OpenOffice столкнетесь с необходимостью установить Java.

Java – это кроссплатформенный язык программирования, вычислительная среда и виртуальная машина, которая необходима для запуска и работы множества программ. Даже в компании Apple используют её для реализации некоторых механизмов на своём сайте.

Скачать Java для Mac

Загрузить последнюю версию для Mac можно на этой странице, перейдя на официальный сайт. Только там вы найдете актуальную версию ПО.

Если вам нужна версия старше, например, Java SE 6 для MacOS, то скачать её можно также на нашем сайте. Или на официальном сайте разработчиков и на странице поддержки Apple.

Не качайте программное обеспечение из неизвестных источников. Вы можете заразить компьютер вирусом – это грозит потерей важных документов и денег.

Системные требования

Java не занимает много места. Чтобы установить виртуальную машину (JVM), нужны права администратора.

Версия операционной системыMacOS X (10.7.3 и выше)
ПроцессорIntel
Размер76.15 Мб
БраузерЛюбой с разрядностью x64

Внимание: Java 7 и более поздние выпуски не поддерживаются 32-битными браузерами.

Процесс установки

Если в процессе работы на Mac потребуется почистить Java-кэш, обратитесь к нашим инструкциям.

Обновление Java на MacOS

Java автоматически проверяет наличие обновлений на официальном сайте. Это происходит при каждом включении компьютера. Вы можете в настройках задать график проверки обновлений: раз в неделю или каждый день.

Проверьте версию Java на компьютере, чтобы понять, требуется ли новая версия. Если необходимо обновить Java SE 6 на Mac OS до последней версии, вы можете сделать это вручную:

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

Источник

Как установить java на mac os

The following are the system requirements for installing the JDK on macOS:

Any Intel-based computer running macOS.

You cannot install Java for a single user. Installing the JDK on macOS is performed on a systemwide basis for all users. Administrator privileges are required to install the JDK on macOS.

Determining the Default JDK Version on macOS

When starting a Java application through the command line, the system uses the default JDK.

To run a different version of Java, either specify the full path, or use the java_home tool. For example:

Installing the JDK on macOS

Uninstalling the JDK on macOS

For example, to uninstall 16 Interim 0 Update 0 Patch 0:

Installation FAQ on macOS Platform

This topic provides answers for the following frequently asked questions about installing JDK on macOS computers.

1. How do I find out which version of Java is the system default?

When you run a Java application from the command line, it uses the default JDK. If you do not develop Java applications, then you do not need to worry about this. See Determining the Default JDK Version on macOS.

2. How do I uninstall Java?

If you want to continue to develop with Java 6 using command-line, then you can modify the startup script for your favorite command environment. For bash, use this:

4. What happened to the Java Preferences app in Application Utilities?

The Java Preferences app was part of the Apple Java installation and is not used by Oracle Java. Therefore, macOS releases from Apple that do not include Apple Java will not include Java Preferences.

Источник

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

как установить java на mac os. Смотреть фото как установить java на mac os. Смотреть картинку как установить java на mac os. Картинка про как установить java на mac os. Фото как установить java на mac os

Рассмотрим пошагово процесс установки версии Java на ваш компьютер с платформой Mac OS X.

Обратите внимание, что существуют ряд требований системы для того, чтобы установить Oracle Java на компьютерные устройства Mac OS X, предусматривающих наличие:

Пошаговая инструкция по установке Java на Mac OS X

Шаг 1 – загрузить Java. Перед загрузкой ознакомьтесь с лицензионным соглашением и отметьте его как принятое;

Шаг 2 – запустите файл, два раза нажав на него;

Шаг 3 – для запуска мастера установки щелкните по нему два раза;

Шаг 4 – после отображения приветствия щелкните клавишу «Продолжить»;

Шаг 5 – поскольку Oracle имеет деловые контакты с фирмами, выпускающими программное обеспечение и компьютерные продукты, при установке Java вы будете получать запросы на их использование. После проверки корректности выбора нужных продуктов продолжите процесс установки нажатием «Продолжить»;

Шаг 6 – полное завершение процесса сопровождается показом подтверждающего экрана. Завершите установку, щелкнув на «Закрыть».

как установить java на mac os. Смотреть фото как установить java на mac os. Смотреть картинку как установить java на mac os. Картинка про как установить java на mac os. Фото как установить java на mac os

Получение сообщений в случае отключения Java

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

Как проверить правильность установки Java?

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

Источник

8 Installation of the JDK and the JRE on macOS

This topic includes the following sections:

System Requirements for Installing the JDK and JRE on macOS

The following are the system requirements for installing the JDK and the JRE on macOS:

Any Intel-based computer running macOS.

You cannot install Java for a single user. Installing the JDK and JRE on macOS is performed on a systemwide basis for all users. Administrator privileges are required to install the JDK and JRE on macOS.

When you install the JDK, it also installs the JRE. However, the system will not replace the current JRE with a lower version.

To determine the current JRE version installed on your system, see Determining the JRE Version Installed on macOS. To install an earlier version of the JRE, you must first uninstall the current version. See Uninstalling the JRE on macOS.

When you install the JRE, you can install only one JRE on your system at a time. The system will not install a JRE that has an earlier version than the current version.

To determine the current JRE version installed on your system, see Determining the JRE Version Installed on macOS. To install an earlier version of the JRE, you must first uninstall the current version. See Uninstalling the JRE on macOS.

Determining the JRE Version Installed on macOS

Only one JRE can be installed on the system at any time. Installing a JRE removes the previously installed JRE.

The JRE version installed on the system can be determined in one of two ways:

Enter the following in a Terminal window (note the escaped space character, ignore line break):

If you have not yet installed Apple’s Java OS X 2012-006 update, then you are still using a version of Apple Java 6 that includes the plug-in and the Java Preferences application. See Notes for Users of macOS That Include the Apple Java 6 Plug-in.

The system will not install a JRE that has an earlier version than the current version. If you want to install an earlier version, then you must first uninstall the existing version.

Determining the Default JDK Version on macOS

When starting a Java application through the command line, the system uses the default JDK. It is possible for the version of the JRE to be different from the default version of the JDK.

If you have not yet installed Apple’s Java OS X 2012-006 update, then you are still using a version of Apple Java 6 that includes the plug-in and the Java Preferences application. See Notes for Users of macOS That Include the Apple Java 6 Plug-in.

To run a different version of Java, either specify the full path, or use the java_home tool: For example:

Installing the JDK on macOS

When you install the JDK, the associated JRE is installed at the same time. The JavaFX SDK and Runtime are also installed and integrated into the standard JDK directory structure.

Before the file can be downloaded, you must accept the license agreement.

Installing the JRE on macOS

Before the file can be downloaded, you must accept the license agreement.

Uninstalling the JDK on macOS

For example, to uninstall 9 Minor 1 Security 2 Patch 1:

Uninstalling the JRE on macOS

Installation FAQ on macOS Platform

This topic provides answers for the following frequently asked questions about installing JDK and JRE on macOS computers.

1. Should I install the JRE or the JDK?

If you only plan to run Java applications, then install the Java Runtime Environment (JRE). The JRE is also referred to as Oracle Java. After you have installed the JRE, you can start Java applets and applications by double-clicking JAR files, JNLP files, and by using the browser. Note that 32-bit browsers, such as Firefox in 32-bit mode, and Chrome, are not supported by the JRE.

If you also plan to create Java applications, then install the Java Development Kit (JDK).

2. How do I find out which version of Java is the system default?

When you start a Java application by clicking a JNLP file, or through the browser, it uses the installed JRE. Only one JRE can be installed. See Determining the JRE Version Installed on macOS.

When you run a Java application from the command line, it uses the default JDK. If you do not develop Java applications, then you do not need to worry about this. See Determining the Default JDK Version on macOS.

If you have not yet installed Apple’s Java macOS 2012-006 update, then you are still using a version of Apple Java 6 that includes the plug-in and the Java Preferences application. See Notes for Users of macOS That Include the Apple Java 6 Plug-in.

3. How do I clear the Java cache?

Follow these steps:

From the Delete Files and Applications dialog box, select Cached Applications and Applets and click OK to clear those files from the cache.

To clear the applet and Web Start cache from a window, use the following command (note escaped space character):

4. How are Java updates managed on macOS?

Every time you start a Java applet or a Java Web Start (JWS) application, the system starts your program and determines in the background (so that performance of your Java application is not affected) if it has checked for a Java update in the last 7 days.

If an update is available, then the Software Update window appears.

The latest update gets downloaded and installed. Restart the browser and other applications to work on the new Java update.

5. How do I uninstall Java?

Depending on your installation, see the related link:

6. I have installed Java for macOS 2012-006 and Apple Java 6 can no longer be used for applets or Web Start. How do I get it back?

The Java for macOS 2012-006 update from Apple uninstalls the Apple-provided Java applet plug-in from all web browsers. You can download the latest version of Java from Java SE Downloads, which has improved security, reliability, and compatibility.

If you prefer to continue using Apple’s Java 6 plug-in, follow the steps provided in the Java for OS X 2014-001 topic at the Apple Developer site.

7. After installing Java for macOS 2012-006, can I continue to use Apple’s Java 6 alongside the macOS JDK or JRE for Java 9?

If you want to continue to develop with Java 6 using command-line, then you can modify the startup script for your favorite command environment. For bash, use this:

8. Can I restore Apple Java after uninstalling Oracle Java?

Go back to Apple Java using the following instructions:

Uninstall Oracle Java by deleting the plug-in file. From a command-line, enter:

Create a symlink using the following command, entered on a single line:

9. I am running Mountain Lion (macOS 10.8) or later and Gatekeeper is blocking an app from launching. What is going on?

10. What happened to the Java Preferences app in Application Utilities?

The Java Preferences app was part of the Apple Java installation and is not used by Oracle Java. Therefore, macOS releases from Apple that do not include Apple Java will not include Java Preferences.

One of the functions of Java Preferences was to set the current version of the JRE. Under Oracle Java, only a single version of the JRE can be installed at a time. See Installing the JRE on macOS.

11. I have Oracle’s version of the JRE installed, but it is not listed in Java Preferences.

This is correct. The JRE will not show up in the Java Preferences list unless you install the full JDK.

12. I have Oracle’s version of the JRE installed, but when I try to run the java command from the command line, it does not work.

Notes for Users of macOS That Include the Apple Java 6 Plug-in

If you have not yet installed Apple’s Java macOS 2012-006 update, then you are still using a version of Apple Java 6 that includes the plug-in and the Java Preferences application.

Under Apple’s implementation of Java, it was possible to have multiple JREs installed. The Java Preferences application was used to determine the first compatible version that would be used. You can change the default JRE by starting Java Preferences and then dragging Java SE 9 to the top of the list.

The Java Preferences window contains a list of installed JREs. Java applications and command-line tools use the listed order to determine the first compatible version to use. The Vendor column indicates whether the Java release is supplied by Apple or Oracle. The Version column specifies the version of Java that is installed.

Reordering the list, by dragging Java SE 9 to the top, makes it the default version of Java.

If you install only Oracle Java JRE 9, then it will not appear in this list. You must install the full JDK for JRE 9 to be listed.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *