adopt openjdk что это
Разница между OpenJDK и AdoptOpenJDK
В чем разница между OpenJDK и AdoptOpenJDK?
ОТВЕТЫ
Ответ 1
Некоторые проекты OpenJDK, такие как OpenJDK 8 и OpenJDK 11, поддерживаются сообществом OpenJDK и предоставляют версии для некоторых версий OpenJDK для некоторых платформ. Члены сообщества взяли на себя ответственность за выпуск исправлений для уязвимостей в этих версиях OpenJDK.
Запись. Возможно, лучше называть сборки OpenJDK от Oracle «сборками Oracle OpenJDK».
В идеале мы бы просто называли все сборки Oracle JDK «Oracle JDK, «под лицензией GPL или коммерческой лицензией в зависимости от вашего ситуация. Однако по историческим причинам различия существуют, мы будем называть их отдельно как оракулы OpenJDK строит и Oracle JDK.
Поставщики OpenJDK и их сравнение
Какой дистрибутив Java я должен использовать?
В дни Sun/Oracle обычно Sun/Oracle создавала проприетарные нисходящие дистрибутивы JDK на основе источников OpenJDK. Недавно Oracle решила делать собственные проприетарные сборки только с коммерческой поддержкой. Они любезно публикуют сборки OpenJDK и на своем https://jdk.java.net/ сайте.
Начиная с JDK 11, происходит переход от мышления одного поставщика (Oracle) к мышлению, при котором вы выбираете поставщика, который дает вам дистрибутив для продукта, в условиях, которые вам нравятся: платформы, для которых они создаются, частота/быстрота выпусков как устроена поддержка и т.д. Если вы не доверяете ни одному из существующих поставщиков, вы даже можете создать OpenJDK самостоятельно.
Если ни одна среда (например, Linux) и/или лицензионное требование не определяют конкретный дистрибутив и если вам нужна самая стандартная сборка JDK, то, вероятно, лучшим вариантом будет использование OpenJDK от Oracle или AdoptOpenJDK.
Дополнительная информация
Java все еще бесплатна сообществом Java Champions (опубликовано 17 сентября 2018 г.)
Java все еще бесплатна 2.0.0 сообществом Java Champions (опубликовано 3 марта 2019 г.)
Алексей Шипилев об интервью JDK Опсиана (опубликовано 27 июня 2019 г.)
AdoptOpenJDK Frequently Asked Questions
Installers
How do I get the source code for a release?
The answer to this depends on which version you are interested in. First, identify the major Java release which will be the first number after jdk in the release name. For example for jdk8u232-b09 the release is 8 for jdk-11.0.5+10 it is 11
HotSpot
Start by cloning the HotSpot codebase for the version you want. For example, replace the version number 8 with the one you want in the following repository: https://github.com/adoptopenjdk/openjdk-jdk8u
When you’ve done that, change into the directory and checkout the release name. Note for jdk9+ add an _adopt suffix:
git checkout jdk8u232-b09
git checkout jdk-11.0.8+10_adopt
See this issue for an explanation as to where that tag comes from.
Checkout the OpenJ9 «extensions» repository for the release you are interested in e.g. https://github.com/ibmruntimes/openj9-openjdk-jdk8 (Replace 8 with the major Java version you are interested in).
Then you can checkout that branch of the extensions repository e.g. git checkout openj9-0.15.1 Note that the checkout does NOT contain the underlying Java version in the OpenJ9 case.
Projects outside OpenJDK
IcedTea-WEB (WebStart support)
IcedTea-WEB is the open implementation of the Java web start component that was included in the Oracle JDK but is not part of the openjdk codebase. The IcedTea-WEB project is now hosted under the AdoptOpenJDK project in the IcedTea-WEB repository and we build and ship as a standalone download that can be used with our other OpenJDK downloads. We do not include support for Java applets as they are generally considered insecure and most modern browsers do not allow for such plugins to be installed any more.
JavaFX (OpenJFX)
Up until JDK 10, JavaFX was a part of the JDK. In 2018, Oracle decided to decouple JavaFX from the JDK. JavaFX lives on as OpenJFX, an OpenJDK subproject. As JavaFX is no longer part of OpenJDK, AdoptOpenJDK does not bundle it with its binaries. For further information, see our detailed OpenJFX FAQ.
GraalVM
While the community edition of Graal is available for all to build, we do not currently have an offering for this. Some experimental builds have been done by the team on Linux/x64, macOS and Windows though they are not currently being actively maintained
If you are an end-user of our builds, we would first recommend trying it with the latest version of the release (i.e. the latest JDK8, JDK11 etc.) as bugs are frequently fixed in the updates. If the problem still occurs with the latest one, check to see if it works with other providers’ builds (Such as Oracle’s if you can) or the upstream OpenJDK builds available via our web site.
Once you’ve done that, feel free to raise an issue in the openjdk-support repository to bring it to our attention and we will attempt to look into it if possible and determine the cause. Bear in mind that the AdoptOpenJDK team does not provide commercial support for our builds, although other providers do.
Licensing and redistribution
We fully support the notion that Java Is Still Free. The JDK and JRE binaries we produce are published under the GPLv2 with Classpath Exception and OpenJDK Assembly Exception (often referred to as GPL2+CE), and you don’t have any additional obligations imposed by the AdoptOpenJDK project beyond the terms of that license. For example, we have no additional requirement for you to reference or credit the AdoptOpenJDK project. We cannot provide legal advice, and if you have any questions about the license or exceptions you should consult your own legal counsel.
Quick-fire FAQ
Now that the trickier questions are out of the way, here are the rest of the things we get regularly asked:
Why do my fonts look weird?
Some commercial implementations of Java use relicensed Lucinda fonts but AdoptOpenJDK as a fully open implementation does not. For this reason, you may find some visible font differences between AdoptOpenJDK and other providers.
Something in the GUI isn’t rendering properly with AdoptOpenJDK but it does with other providers!
For JDK8, Oracle’s JDK used a renderer called Ductus. For JDK9 and later Oracle’s JDK and OpenJDK (and therefore AdoptOpenJDK) use the Marlin renderer. For JDK8, AdoptOpenJDK is using an open-source renderer called Pisces. This may result in differences between AdoptOpenJDK and Oracle when running JDK8. Work is planned to switch to using Marlin for JDK8
Can I get JDK Mission Control (JMC) for AdoptOpenJDK?
Yes! We provide downloads of JMC which are built through our CI
What is the difference between HotSpot and OpenJ9 downloads?
HotSpot is the default Java Virtual Machine that is included in the OpenJDK codebase. OpenJ9 is an alternative Java Virtual Machine developed by IBM for its own proprietory JVM and was open-sourced in 2017. You may find that OpenJ9 uses less memory than the HotSpot variants. Have a look at the OpenJ9 Performance Overview or the transition document for more information
What are the OpenJ9 «Large Heap» variants?
The Large Heap variants of the OpenJ9 builds (also known as the «non-compressed references builds) allow for Java heap sizes greater than 57Gb. If you need heap sizes that large, then pick the large heap versions (they have XL in the download filenames). The large heap versions are not on all platforms but the number has increased over time.
I’m worried about security vulnerabilities in your project compared to other OpenJDK implementations
The AdoptOpenJDK project does not work on security vulnerability updates independently of the community code base held at OpenJDK. For bugs including security issues, we work with the OpenJDK project to fix bugs there, and then build, test and distribute the code here. The OpenJDK LTS updates projects are working on vulnerabilities that are discussed amongst members of the OpenJDK Vulnerability Group. Patches to fix those vulnerabilities are applied to the appropriate OpenJDK repository ‘upstream’, and then we build, test and distribute the resulting binaries at AdoptOpenJDK. We do not compete with OpenJDK, we work together with them and address security vulnerabilities together.
What are the CPU and PSU updates and which do you build?
AdoptOpenJDK ships binaries based on the PSU (Patch Set Update) release for the quarterly updates. This contains additional fixes from the CPU (Critical Patch Update) and due to the very high levels of testing which the AdoptOpenJDK project runs on our release builds we are confident enough that the additional fixes in the PSU updates will not cause any problems.
How can I get commercial support for AdoptOpenJDK binaries?
The AdoptOpenJDK project does not itself provide commercial support for the binaries we produce, however, if you find an issue please raise it in the openjdk-support repository. If you need a stronger level of formal support, check out the support pages for the current list of commercial support providers for the AdoptOpenJDK binaries
Do you provide 32-bit builds?
Most of our builds are 64-bit only. The exceptions are arm32 so you can run our builds on your raspberry pi and other such devices, and HotSpot windows builds are also available in 32-bit versions. A Windows 32-bit version is also available for OpenJ9 but only for JDK8. We have had requests for 32-bit Linux/x86 but they are not available in our build farm at the moment.
So what is the TSC?
They are our overlords 🙂 Seriously, the TSC (Technical Steering Committee) is a group of people who run the AdoptOpenJDK project. Despite the name, most technical decisions are taken outside the TSC and only escalated to the TSC if issues arise. You will find that they are frequently the people responding to issues in GitHub and also in slack. Business decisions, the scope of the project, and management of finances is all done by the TSC. If you want something discussed by the TSC or need a decision from them please raise an issue in the GitHub TSC repository (or add the TSC-agenda label elsewhere) as that will generally flag it for inclusion in a future TSC meeting. The current TSC members with their affiliation are listed here. The TSC members also approve all releases.
OpenJFX FAQ
Support for JavaFX/OpenJFX is a hot topic, and we receive many questions about it. This section tries to answer the most important ones from the perspective of AdoptOpenJDK.
Does AdoptOpenJDK offer OpenJDK binaries with JavaFX support?
Are there any plans to bundle OpenJFX with AdoptOpenJDK’s binaries?
Are there any plans to build standalone binaries of OpenJFX at AdoptOpenJDK?
Why does AdoptOpenJDK not include OpenJFX?
JavaFX has been unbundled from OpenJDK and now exists as a separate project called OpenJFX with a different release schedule and support policy. Contrary to OpenJDK, there is no open-source long term support for any OpenJFX version. While OpenJDK 8 receives updates for the years to come, OpenJFX 8 is unmaintained and contains known security issues. OpenJFX 11 and newer only get patches for 6 months after their initial release. This situation makes it impossible for AdoptOpenJDK to provide high-quality, up-to-date binaries of OpenJDK LTS releases (8 and 11 at the time of writing) with a bundled OpenJFX.
As a result, we could only provide OpenJFX binaries for the most recent OpenJDK version. But because the OpenJFX project already does that itself, we want to focus our resources on OpenJDK.
What are my options if I need to run a program that uses JavaFX?
The OpenJFX project provides binaries of OpenJFX that work great together with AdoptOpenJDK. See the OpenJFX documentation for instructions on how to get started.
What are my options if I need patches or support for JavaFX 8?
There are versions of Azul Zulu and BellSoft Liberica that include JavaFX and are available free of charge. The ojdkbuild project offers JDK 8 builds with patched OpenJFX 8 overlays for Windows (sources).
What are my options if I need patches or support for OpenJFX 11 or later?
Gluon, the main contributor to OpenJFX, provides LTS support for OpenJFX 11.
There are versions of Azul Zulu and BellSoft Liberica that include JavaFX and are available free of charge.
What would be required to get AdoptOpenJDK to include OpenJFX?
If a credible interest group stepped up to provide long term support for OpenJFX that follows the release schedule of OpenJDK, we would consider bundling OpenJFX. If you want to support or sponsor such an effort, we are happy to talk: Join the #openjfx channel on the AdoptOpenJDK Slack workspace.
Так много JDK… Какой использовать и чем это грозит?
От переводчика: Решение перевести эту статью пришло не само собой — скорее это вынужденная мера :). К нам, как к вендорам фреймворка CUBA, обращаются с этим вопросом с завидной регулярностью. Безусловно, для нас это тоже крайне важная тема, и в ответ на последние изменения мы подняли тестовые стенды как на Oracle JDK, так и на Liberica JDK — эта мера на данный момент ограждает наших пользователей от непредвиденных лицензионных трат. Однако, эта тема еще не закрыта, и мы продолжаем внимательно следить за развитием событий, и, кто знает, возможно нам придется добавлять стенды для еще каких сборок JDK уже в следующем году.
Статья под катом подкупает тем, что она лаконично описывает проблематику и наиболее популярные JDK с их особенностями.
Недавно Oracle заявили, что эволюция Java кардинально изменится благодаря переходу на «Release Train» — новому подходу к выкатыванию версий. Это изменение также повлекло за собой перемены в плане поддержки версий, которая теперь будет осуществляться не для всех, а только для LTS версий. Сообщество Java чемпионов разъяснило вводимые новшества, детальный документ доступен в сети.
Даже с учетом этих новостей остаются вопросы: какие билды JDK сейчас доступны? Будут ли они бесплатными или коммерческими? Прежде чем ответить на этот вопрос, важно понять, какие требования предъявляются к JDK как продукту. Фактически, есть только один основной исходный код JDK. Он находится здесь. Кто угодно может использовать исходный код для построения собственной сборки и размещения ее где-то в сети. Однако есть отдельная процедура сертификации, которая должна быть пройдена, чтобы сборка JDK считалась валидной. Сертификация осуществляется Java Community Process (JCP), который предоставляет Technology Compatibility Kit (TCK). Если какая-либо организация создает новую сборку OpenJDK, которая отвечает TCK, она считается «совместимой с Java SE».
Имейте в виду, что сборка не может называться «Java SE», если компания, осуществившая сборку, не приобрела коммерческую лицензию от Oracle. Например, сборки AdoptOpenJDK, которые проходят TCK, не являются «Java SE», но являются «Java SE compliant». Также нужно учитывать, что сертификация сейчас основывается “на честном слове” — результаты не отсылаются в JCP/Oracle для верификации и являются закрытой информацией. Короче говоря, каждый вендор, взявший исходники OpenJDK и собравший версию, порождает еще одну отдельную сборку JDK.
Итак, без лишних слов, рекомендуем ознакомиться со следующими готовыми к использованию JDK:
Oracle JDK
Это главный поставщик Java 11 (релиз уже состоялся). Это коммерческая версия с платной поддержкой. Ее можно бесплатно скачивать и использовать только непосредственно для разработки. Использовать ее в продакшене, не заплатив Oracle, нельзя (так что для многих не интересующихся вопросами лицензирования это ловушка). Oracle планирует предоставлять платную поддержку до 2026 года и далее. В отличие от того, как было раньше, сборка Oracle JDK ничем не “лучше” OpenJDK (по стольку по скольку оба находятся на одном и том же уровне security patch level).
OpenJDK Build от Oracle
AdoptOpenJDK
Это тоже бесплатные и не-брендовые сборки OpenJDK, распространяемые по лицензии GPL с Classpath Extension, только в отличие от билдов OpenJDK от Oracle эти версии сборки будут действовать в течение более длительного времени для основных версий, таких как Java 11. Версии Java 11 будут выпускаться в течение 4 лет через год после следующего основного релиза. AdoptOpenJDK ориентируется на сообщество. Пока другие команды создают и публикуют исправления безопасности для исходного репозитория OpenJDK, они будут выпускать билды. И IBM, и Red Hat обозначили, что намерены выпускать такие патчи.
AdoptOpenJDK OpenJ9
Вдобавок к стандартным сборкам OpenJDK AdoptOpenJDK будет также предоставлять версии с OpenJ9 вместо HotSpot. OpenJ9 изначально была JVM от IBM, но сейчас OpenJ9 имеет открытый исходный код. И, кстати говоря, эта опция наиболее достойная изучения.
Red Hat OpenJDK
Red Hat предоставляет версии сборки OpenJDK на Red Hat Enterprise Linux (RHEL), являющемся коммерческим продуктом с платной поддержкой. Red Hat очень неплохо справляются с исправлениями безопасности в OpenJDK. В прошлом Red Hat отвечали за security-апдейты Java 6 и 7. Сборка от Red Hat более интегрирована с операционной системой, так что ее нельзя назвать типичным билдом OpenJDK (отсутствует JDK конечного пользователя).
Azul Zulu
Zulu — брендированная версия OpenJDK с платной коммерческой поддержкой. К тому же, хотя Azul предоставляет некоторые элементы Zulu бесплатно в рамках «Zulu Community», они не несут никаких особых обязательств по доступности этих сборок. У Azul довольно масштабный план по поддержке Zulu, включающий поддержку Java 9, 13 и 15, в отличие от других поставщиков.
Amazon Corretto
Это новейшая из всех описанных опций. Corretto — бесплатная версия сборки OpenJDK с долгосрочной поддержкой, проходящая TCK. Она распространяется по стандартным условиям лицензирования всех версий OpenJDK: GPL + CE. Amazon создаст собственные патчи и запустят Corretto на AWS, так что он будет использоваться довольно активно (и уже добавлен в некоторые продукты). Поддержка Java 8 планируется по меньшей мере до июня 2023.
В процессе преобразования исходного OpenJDK в различные версии сборки производитель может добавлять различные утилиты или брендировать продукт, если это не препятствует сертификации (TCK). Например, нельзя добавить новый public-метод в API или новые языковые ресурсы.
Есть и другие реализации JDK, такие как IBM и SAPMachine. Однако эти версии сборки не так часто используются, поэтому они не упомянуты в этой статье. Более подробную информацию можно найти здесь и здесь.
Заключение
Лично я особой проблемы в наличие нескольких версий JDK не вижу, так как всем им нужно проходить сертификацию (TCK). Чем действительно стоит обеспокоиться — это использование одной из проприетарных JDK и бесплатной версии сборки от Oracle, во избежание головной боли в будущем. Если вы используете только базовые функции (например, ваш бизнес не особо зависит от секьюрити-апдейтов), вам больше подойдут сборки OpenJDK от Oracle (НЕ OracleJDK), т.к. они постоянно обновляются (в течение 6 месяцев после релиза), и вы можете использовать JDK в продакшене без особых проблем. Если в вашем бизнесе задействованы облачные сервисы (или с AWS), хорошим выбором будет AWS Corretto, который уже пригоден к использованию на Amazon Linux и Docker.
Installation
AdoptOpenJDK binaries are available for download in the following types of installation package:
The binaries are supported on the architectures and operating systems listed in Supported Platforms. If you’re migrating to AdoptOpenJDK, you can learn about the differences between Oracle JDK and AdoptOpenJDK in our Migration Guide and any steps that you might need to take. For example, how to use IcedTea-Web as an alternative to Web Start.
Archive files
Platform:
Checksum
Installers
Installers are currently available for Windows®, Linux®, and macOS® JDK and JRE packages. Installation steps are covered in the following sections:
Windows MSI installer packages
AdoptOpenJDK Windows installer packages are available as standard .msi files, which can be run with an interactive user interface or run silently from the command line. The installer is designed for use on a per-machine basis, not per-user basis, so you can have only one installation of the MSI on a machine for all users.
Note: Windows installer packages are supported only on Windows x64 systems.
GUI installation
Instructions for running an interactive installation using the Windows MSI installer.
1. Download the .msi file. Open it to launch the installation program.
2. Read and accept the license if you are happy with the terms.
3. On the Custom Setup screen you can choose the features that you want to install and optionally change the default installation directory. By default, AdoptOpenJDK installs to c:\Program Files\AdoptOpenJDK\
4. When you have chosen the features that you want to install, click Next.
5. Click Install to begin the installation.
6. When the installation is finished, click Finish to close the program.
Command-line installation
A silent installation allows you to install the Windows package with pre-selected features without user interaction, which can be useful for widescale deployment. Follow these steps:
2. Choose the features that you want to install, which are shown in the following table:
| Feature | Description |
|---|---|
| FeatureMain | Core AdoptOpenJDK installation (DEFAULT) |
| FeatureEnvironment | Update the PATH environment variable (DEFAULT) |
| FeatureJarFileRunWith | Associate .jar files with Java applications (DEFAULT) |
| FeatureJavaHome | Update the JAVA_HOME environment variable |
| FeatureIcedTeaWeb | Install IcedTea-Web |
| FeatureJNLPFileRunWith | Associate .jnlp files with IcedTea-web |
| FeatureOracleJavaSoft | Updates registry keys HKLM\SOFTWARE\JavaSoft\ |
Note: FeatureOracleJavaSoft can be used to prevent Oracle Java launching from PATH when AdoptOpenJDK is uninstalled. Reinstall Oracle Java if you need to restore the Oracle registry keys.
Optional parameters can be used that group some of the features together:
| Parameter | Features |
|---|---|
| INSTALLLEVEL=1 | FeatureMain,FeatureEnvironment,FeatureJarFileRunWith |
| INSTALLLEVEL=2 | FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome,FeatureIcedTeaWeb |
| INSTALLLEVEL=3 | FeatureMain,FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome,FeatureIcedTeaWeb,FeatureJNLPFileRunWith |
3. Run the command on the target workstation.
The following example silently installs AdoptOpenJDK, updates the PATH, associates .jar files with Java applications and defines JAVA_HOME:
Note: You must use INSTALLDIR with FeatureMain.
The following example silently installs all the features for INSTALLLEVEL=1:
If you want to launch an interactive installation in another language you can use the Windows installer TRANSFORMS option to set your language choice. For example, to set the UI language to German, use code 1031, which must be preceded by a :.
For a list of supported codes, see the Language list.
Reinstalling or upgrading
To reinstall AdoptOpenJDK in silent mode with default features, run the following command:
If you want to upgrade AdoptOpenJDK in silent mode, run the following command:
Note: REINSTALL=ALL automatically sets REINSTALLMODE=omus
Upgrade limitation:
Upgrading .msi files works only for the first 3 digits of the build number due to an MSI limitation:
Reference reading
macOS PKG installer packages
AdoptOpenJDK macOS installer packages are available as standard .pkg files, which can be run with an interactive user interface or run silently from the Terminal command line.
GUI installation
Instructions for running an interactive installation using the macOS PKG installer.
2. Navigate to the folder that contains the file and open it to launch the installation program or drag the icon to your Application folder.
3. The Introduction screen indicates the target location for the installation, which you can change later in the install process. Click Continue.
4. Read the license, click Continue and accept the license if you are happy with the terms.
5. Change the target location for the installation. Click Install to complete the installation.
Command-line installation
A silent installation allows you to install the macOS package without user interaction, which can be useful for widescale deployment. You must have administrator privileges. Follow these steps:
2. Launch the Terminal app (terminal.app).
3. Run the following command:
4. Enter the Administrator password.
Linux RPM and DEB installer packages
AdoptOpenJDK RPM and DEB packages are available for installing on your favourite Linux distribution.
Deb installation on Debian or Ubuntu
Deb installation on Raspberry Pi OS, Linux Mint and other Debian-based distributions
RPM installation
RPM packages are maintained in artifactory for various Linux distributions. For a full list (with artifactory baseurl values), see Supported RPM versions.
RPM installation on Centos, RHEL, or Fedora
The following steps describe how to install an RPM package for Centos. To install an RPM for RHEL or Fedora update the baseurl value accordingly.
1. Add the appropriate RPM repository to your /etc/yum.repos.d/adoptopenjdk.repo file, by running the following command:
2. Install your choice of OpenJDK. For example, to install AdoptOpenJDK version 8 with OpenJ9, run:
RPM installation on openSUSE or SLES
The following steps describe how to install an RPM package on openSUSE v15. To install an RPM for SLES, or to install a different version of openSUSE, switch the baseurl value.
1. Add the appropriate RPM repository to your /etc/yum.repos.d/adoptopenjdk.repo file, by running the following command:
2. Install your choice of OpenJDK. For example, to install AdoptOpenJDK version 8 with OpenJ9, run:

