使用 alt-java

Red Hat build of OpenJDK 11

Red Hat Customer Content Services

摘要

Red Hat build of OpenJDK 11 是 Red Hat Enterprise Linux 平台上的红帽产品。使用 alt-java 指南提供了 alt-java 概述,定义 java 和 alt-java 二进制文件之间的区别,并解释了如何使用 alt-java。

使开源包含更多

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于此项工作十分艰巨,这些更改将在即将推出的几个发行版本中逐步实施。详情请查看 CTO Chris Wright 的信息

对红帽文档提供反馈

我们感谢您对我们文档的反馈。要提供反馈,您可以突出显示文档中的文本并添加注释。

本节介绍如何提交反馈。

先决条件

  • 已登陆到红帽客户门户网站。
  • 在红帽客户门户中,以多页 HTML 格式查看文档。

流程

要提供反馈,请执行以下步骤:

  1. 点文档右上角的反馈按钮查看现有的反馈。

    注意

    反馈功能仅在多页 HTML 格式中启用。

  2. 高亮标记您要提供反馈的文档中的部分。
  3. 点在高亮文本旁弹出的 Add Feedback

    文本框将在页面右侧的"反馈"部分中打开。

  4. 在文本框中输入您的反馈,然后点 Submit

    创建了一个与文档相关的问题。

  5. 要查看问题,请单击反馈视图中的问题跟踪器链接。

第 1 章 alt-java概述

红帽软件包包含对 SSB 漏洞的缓解方案,采用 java 二进制文件的补丁形式。此补丁禁用 x86-64 (Intel 和 AMD)处理器中存在的优化。禁用该优化会降低内核侧通道攻击的风险,但也会降低 CPU 性能。

由于补丁降低了性能,它已从 java 启动程序中删除。现在提供了一个新的二进制 alt-java。在 2021 年 1 月的补丁更新版本(1.8.0 282.b08、11.0.10.9))中 ,alt-java 二进制文件包含在红帽构建的 OpenJDK 11 和 Red Hat build of OpenJDK 11 GA RPM 软件包中。

其他资源

第 2 章 javaalt-java之间的区别

alt-javajava 二进制文件之间存在相似性,但 SSB 缓解措施除外。

虽然 SBB 缓解措施只针对 x86-64 架构(Intel 和 AMD)存在,但 alt-java 在所有构架上都存在。对于非 x86 架构,alt-java 二进制文件与 java 二进制文件相同,但 alt-java 没有补丁。

其他资源

  • 有关 alt-javajava 之间的相似性的更多信息,请参阅 Red Hat Bugzilla 文档中的 RH1750419

第 3 章 Alt-javajava 使用

根据您的需要,您可以使用 alt-java 二进制文件或 java 二进制文件来运行应用代码。

3.1. Alt-java 用法

对于运行不受信任的代码的任何应用程序,请使用 alt-java。请注意,使用 alt-java 不是所有指定执行漏洞的解决方案。

3.2. Java 用法

java 二进制文件用于安全环境中的性能关键任务。Red Hat Enterprise Linux 系统中的大部分 RPM 使用 java 二进制文件,但 IcedTea-Web 除外。IcedTea-Web 使用 alt-java 作为其启动程序,因此您可以使用 IcedTea-Web 运行不受信任的代码。

其他资源

第 4 章 alt-java的性能影响

alt-java 二进制文件包含 SSB 缓解措施,因此对 java 不再存在 SSB 缓解性能影响。

注意

使用 alt-java 可能会显著降低 Java 程序的性能。

您可以选择 附加资源部分 中列出的任何 Red Hat Bugzilla 链接,找到使用 alt-java 可能存在的一些 Java 性能问题的详细信息。

更新于 2023-09-19

法律通告

Copyright © 2023 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.