unable to load java runtime environment mac что делать
Install Java (JRE) | Mac OS 10.7 and later
某些 Creative Cloud 应用程序、服务和功能在中国不可用。
Issue
An error “you need to install the legacy Java SE 6 runtime”, is encountered when you open any Adobe application.
Solution
With Mac OS 10.7 (Lion) and later, the Java runtime is no longer installed automatically as part of the OS installation. Follow any of the methods below to install Java runtime.
Method 1
On Mac OS 10.10 (Yosemite), when you launch any Adobe product, you might receive a warning «The Application has been moved and its path has been changed. «.
Click Repair Now or Update button to update the location and resolve the issue. When prompted for password, enter your system password to complete.
Method 2
If Java runtime is not installed, you are prompted to install when you first launch any Adobe product. Follow the onscreen instructions in the Java required notification dialog box to install.
Method 3 (Mac OS 10.7 and 10.8)
Use the following method to initiate the Java runtime installation or confirm if it is installed.
If Java is not installed, you receive the following message: “To open “Java Preferences,» you need a Java runtime. Would you like to install one now?”
Additional information
Many Adobe applications depend on the Oracle Java Runtime Environment (JRE) for some features to work. Apple recently changed the way it includes Java in Mac OS, and with Lion, Java is no longer preinstalled. It is now an optional install that you must select.
Since current Adobe installers and applications were built before these changes by Apple, Adobe software anticipates that Java is installed. Adobe and Apple have worked together to ensure that you can install Java at OS install time. Or it can be installed later before you install Adobe applications. At runtime, when you launch an Adobe application, you are prompted to install Java if it is not already installed. If you do not install Java before running an Adobe application, there can be missing or improperly behaving features. If you encounter any issues, install Java to correct the problems. Adobe recommends that corporate IT organizations pre install Java (or make sure that Java can be installed through their firewalls/security) to avoid conflicts with Adobe applications.
UniFi Controller on MacOS fails to start
Issue description
When trying to launch the app, I get an error of Unable to load Java Runtime Environment :
This is after upgrading from an older version. The UniFi team’s response is:
We stopped bundling Java as of UniFi Network 5.11.47. If you’re installing that release or later please make sure you have manually installed a current release of Java 8 beforehand. Only the Java Runtime Environment (JRE) is required. Oracle JRE 8 offers the simplest path as it will simply “just work” without requiring any changes. We may investigate alternative JVMs and update this message accordingly.
Which boils down to:
They ask you to go to https://www.java.com/en/download/ and download the Oracle JRE. At the time of this writing:
Recommended Version 8 Update 281 (filesize: 80.67 MB)
Release date January 19, 2021
Requiring Oracle Java is a mistake for business users, or any commercial use that requires Oracle Java. When Oracle changed the licensing model for Java, the licensing cost and compliance costs for business / commercial users got very expensive.
There are good and better Java distributions, including OpenJDK, AdoptOpenJDK and Amazon AWS Corretto.
OpenJDK 11 and OpenJDK 8 are the current long-term support releases. Requiring Oracle Java 8 is a mistake. If there is a technical reason in the Unifi implementation that somehow requires Oracle Java, that’s even more concerning.
1000s or 10000s of companies have already moved to OpenJDK or Corretto to avoid the licensing costs of Oracle Java. There is no advantage to using Oracle Java. OpenJDK is source-code compatible, and Corretto incorporates bug fixes and performance enhancements in addition to being compatible.
Solution 1
Start with installing Homebrew following the instructions on https://brew.sh/ and install a Java version you like, e.g.:
Then install the start-up script
/bin/unifi.sh (also works with any other Java 8):
Solution 2
This solution requires you to modify the UniFi app files.
Link a Java installation to the UniFi.app:
After the update you should be able to start the app like any other app.
Установка Java (JRE) | Mac OS 10.7 и более поздние версии
При запуске любого из приложений Adobe возникает ошибка «необходимо установить более раннюю версию Java SE 6».
Решение
В Mac OS 10.7 (Lion) и более поздних версиях Java Runtime больше не устанавливается автоматически в составе программного обеспечения ОС. Чтобы установить Java Runtime, используйте следующие методы.
Способ 1
Можно загрузить и установить последнюю версию Java Runtime с веб-сайта Java: Загрузка бесплатного программного обеспечения Java.
В Mac OS 10.10 (Yosemite), при запуске любого продукта Adobe может появиться предупреждение: «Приложение было перемещено, и путь к нему изменился…».
Нажмите кнопку Восстановить сейчас или Обновить, чтобы обновить местоположение и устранить неполадку. При появлении запроса на ввод пароля введите пароль системы, чтобы завершить операцию.
Способ 2
Если служба Java Runtime не установлена, при первом запуске любого продукта Adobe появляется запрос на ее установку. Следуйте инструкциям в диалоговом окне уведомления о необходимости установить Java, чтобы установить службу.
Способ 3 (Mac OS 10.7 и 10.8)
Следующим способом можно запустить установку службы Java Runtime или убедиться в том, что она уже установлена.
Если приложение Java не установлено, появится следующее сообщение: «Чтобы открыть настройки Java, необходима служба Java Runtime. Хотите установить ее сейчас?»
Дополнительная информация
Для работы некоторых функций приложений Adobe требуется среда Oracle Java Runtime Environment (JRE). Корпорация Apple недавно изменила политику включения компонентов Java в систему Mac OS, и начиная с версии Lion приложение Java больше не входит в состав устанавливаемого ПО. Теперь это один из необязательный вариантов установки, который необходимо выбрать.
Поскольку текущие программы установки Adobe и приложения были разработаны до внедрения этого изменения корпорацией Apple, для работы с приложениями Adobe требуется установка Java. Компания Adobe и корпорация Apple совместно работают над тем, чтобы обеспечить установку Java во время установки ОС. Кроме того, Java можно установить позже, до установки приложений Adobe. При запуске приложения Adobe во время выполнения программы, появляется запрос на установку службы Java, если она еще не установлена. Если перед запуском приложения Adobe служба Java не установлена, в приложении могут отсутствовать или неправильно работать некоторые функции. При возникновении каких-либо проблем установите службу Java, чтобы исправить их. Компания Adobe рекомендует ИТ-организациям установить службу Java (или удостовериться в том, что брандмауэр или антивирусное ПО не блокирует ее установку), чтобы избежать конфликтов с приложениями Adobe.
Если служба Java Runtime не установлена, могут возникать следующие неполадки:
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.
Installing Java on OS X 10.9 (Mavericks)
No Java runtime present, requesting install.
No Java runtime present, requesting install.
How can I solve this problem?
11 Answers 11
The new Mavericks (10.9) showed me the «Requesting install», but nothing happened.
Update: As mentioned in the comments below, there is a newer version of this same package:
Java for OS X 2014-001 includes installation improvements, and supersedes all previous versions of Java for OS X. This package installs the same version of Java 6 included in Java for OS X 2013-005.
If you only want to install the latest official JRE from Oracle, you can get it there, install it, and export the new JAVA_HOME in the terminal.
That’s the cleanest way I found to install the latest JRE.
/.profile instead of
/.bash_profile to get this work.
The right place to download the JDK for Java 7 is Java SE Downloads.
All the other links provided above, as far as I can tell, either provide the JRE or Java 6 downloads (incidentally, if you want to run Eclipse or other IDEs, like IntelliJ IDEA, you will need the JDK, not the JRE).
(copied here as it was mentioned that «above» may eventually not make sense as answers are re-sorted).
I also set my JAVA_HOME to point to where jdk_1.7.0_xx.jdk was installed:
Then add that to your PATH :
The alternative is to fuzz around with Apple’s insane maze of hyperlinks, but honestly life is too short to bother.










