Using alt-java

OpenJDK 8

Red Hat Customer Content Services

Abstract

OpenJDK 8 is a Red Hat offering on the Red Hat Enterprise Linux platform. The Using alt-java guide provides an overview of alt-java, defines the differences between java and alt-java, and explains how to use alt-java.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.

Providing feedback on Red Hat documentation

We appreciate your feedback on our documentation. To provide feedback, you can highlight the text in a document and add comments.

This section explains how to submit feedback.

Prerequisites

  • You are logged in to the Red Hat Customer Portal.
  • In the Red Hat Customer Portal, view the document in Multi-page HTML format.

Procedure

To provide your feedback, perform the following steps:

  1. Click the Feedback button in the top-right corner of the document to see existing feedback.

    Note

    The feedback feature is enabled only in the Multi-page HTML format.

  2. Highlight the section of the document where you want to provide feedback.
  3. Click the Add Feedback pop-up that appears near the highlighted text.

    A text box appears in the feedback section on the right side of the page.

  4. Enter your feedback in the text box and click Submit.

    A documentation issue is created.

  5. To view the issue, click the issue tracker link in the feedback view.

Chapter 1. Overview of alt-java

The family of Spectre/Meltdown vulnerabilities includes Speculative Store Bypass (SSB), which may affect the Java VM (CVE-2018-3639).

Red Hat packages contain a mitigation for this vulnerability in the form of a patch for the Java binary. However, this patch reduces performance by up to 10% in some cases. This is described in RH1566890.

Since the patch reduces performance, it has been removed from the “java” launcher. A new binary “alt-java” is now available. From the January 2021 CPU release (1.8.0 282.b08, 11.0.10.9) onwards the alt-java binary is included in OpenJDK 1.8.0 and 11 GA rpms.

Chapter 2. Differences between java and alt-java

“alt-java” is the same as “java”, except for the SSB mitigation. Refer, RH1750419.

Although the SBB mitigation patch is there only for x86-64 (Intel and AMD), the alt-java is present on all architectures. So on non-x86, the alt-java is identical to java without any patches.

Chapter 3. Using alt-java and java

3.1. Using alt-java

Use “alt-java” for any applications that run untrusted code. However, be aware that it is not a solution to all speculative execution vulnerabilities. For more information refer, Java and Speculative Execution Vulnerabilities.

3.2. Using java

Use the “java” binary for performance-critical tasks in a secure environment. All of the RPMs in a Red Hat Enterprise Linux system except IcedTea-Web use the “java” binary. IcedTea-Web may be used to run untrusted code, so it uses ”alt-java” as its launcher.

Chapter 4. Performance impact of alt-java

By moving the SSB mitigation to “alt-java”, the performance impact on “java” is removed.

Using “alt-java” may significantly reduce the performance of Java programs. You can find detailed information in Red Hat Bugzilla:

Revised on 2021-04-22 14:38:38 UTC

Legal Notice

Copyright © 2021 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.