为 Windows 配置红帽构建的 OpenJDK 11

Red Hat build of OpenJDK 11

Red Hat Customer Content Services

摘要

红帽构建的 OpenJDK 是 Microsoft Windows 平台上的红帽产品。为 Windows 配置红帽构建的 OpenJDK 11 指南提供了此产品概述,并解释了如何配置软件。

使开源包含更多

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

对红帽文档提供反馈

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

本节介绍如何提交反馈。

先决条件

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

流程

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

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

    注意

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

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

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

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

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

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

第 1 章 从已安装版本的应用程序中选择特定的红帽构建的 OpenJDK

您可以从 Microsoft Windows 上安装的版本为应用程序选择特定的红帽构建的 OpenJDK。

先决条件

  • 系统中已安装了多个红帽构建的 OpenJDK。

流程

  1. 以 Windows 系统管理员身份登录。
  2. 在命令行中,将提示设置为 C:/
  3. 输入 dir /b /s java.exe 来列出系统中所有已安装的 OpenJDK。
  4. 将环境变量的值设置为红帽构建的 OpenJDK (或 JRE)安装路径:

    setx -m JAVA_HOME "Path to Java"

    如果路径包含空格,请使用简短的路径名称。

  5. 重新启动命令提示以重新加载环境变量。
  6. 检索 path 变量的值:

    echo %JAVA_HOME%
  7. 设置 path 变量的值:

    setx -m PATH "%PATH%;%JAVA_HOME%\bin";

第 2 章 为 Microsoft Windows 的红帽构建的 OpenJDK 11 设置 Mission Control

此流程描述了如何为 Microsoft Windows 的红帽构建的 OpenJDK 11 安装和设置 Mission Control。

先决条件

  • Red Hat build of OpenJDK 11 for Microsoft Windows 已安装在系统上。

流程

  1. 解压存档。
  2. Mission Control 目录中,打开 JMC 客户端可执行文件。

    红帽构建的 OpenJDK 实体
  3. 在命令行中,输入 jmc 或 JMC 可执行文件的完整路径启动 JMC lient。

    JAVA_HOME\missioncontrol\jmc.exe
  4. 在 JMC 客户端屏幕上,从 File 菜单创建新连接,选择您的 JVM 并启动 JMX 控制台。

因此,您应该获得包含 Processors, Memory consumption, Java heap use, JVM CPU 用量等的概览页面。

第 3 章 将红帽构建的 OpenJDK 配置为使用自定义堆大小运行

红帽构建的用于 Microsoft Windows 的 OpenJDK 11 可以配置为使用自定义堆大小。

先决条件

  • 安装的 Java 运行时

流程

  1. 通过在 java 命令行中添加最大堆大小选项来运行应用。例如,要将最大堆大小设置为 100MB,请使用 -Xmx100m 选项。

    $ java -Xmx100m <your-main-class>

更新于 2023-09-20

法律通告

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.