为 Windows 配置红帽构建的 OpenJDK 11


Red Hat build of OpenJDK 11

Red Hat Customer Content Services

摘要

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

提供有关红帽构建的 OpenJDK 文档的反馈

要报告错误或改进文档,请登录到 Red Hat JIRA 帐户并提交问题。如果您没有 Red Hat Jira 帐户,则会提示您创建一个帐户。

流程

  1. 单击以下链接 以创建 ticket
  2. Summary 中输入问题的简短描述。
  3. Description 中提供问题或功能增强的详细描述。包括一个指向文档中问题的 URL。
  4. Submit 创建问题,并将问题路由到适当的文档团队。

使开源包含更多

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

第 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>

更新于 2024-05-10

法律通告

Copyright © 2024 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.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.