Configuring Red Hat build of OpenJDK 11 for Windows
Abstract
Providing feedback on Red Hat build of OpenJDK documentation
To report an error or to improve our documentation, log in to your Red Hat Jira account and submit an issue. If you do not have a Red Hat Jira account, then you will be prompted to create an account.
Procedure
- Click the following link to create a ticket.
- Enter a brief description of the issue in the Summary.
- Provide a detailed description of the issue or enhancement in the Description. Include a URL to where the issue occurs in the documentation.
- Clicking Submit creates and routes the issue to the appropriate documentation team.
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.
Chapter 1. Selecting a specific Red Hat build of OpenJDK from the installed versions for an application
You can select a specific Red Hat build of OpenJDK from the installed versions on Microsoft Windows for an application.
Prerequisites
- More than one Red Hat build of OpenJDK is already installed on the system.
Procedure
- Log in as a Windows system administrator.
-
On the command line, set the prompt to
C:/
. -
Enter
dir /b /s java.exe
to list all of the installed OpenJDKs on the system. Set the value of the environment variable to your Red Hat build of OpenJDK (or JRE) installation path:
setx -m JAVA_HOME "Path to Java"
If the path contains spaces, use the shortened path name.
- Restart Command Prompt to reload the environment variables.
Retrieve the value of the path variable:
echo %JAVA_HOME%
Set the value of path variable:
setx -m PATH "%PATH%;%JAVA_HOME%\bin";
Chapter 2. Setting Mission Control for Red Hat build of OpenJDK 11 for Microsoft Windows
This procedure describe how to install and set Mission Control for Red Hat build of OpenJDK 11 for Microsoft Windows.
Prerequisites
- Red Hat build of OpenJDK 11 for Microsoft Windows is installed on the system.
Procedure
- Extract the archive.
In the
Mission Control
directory, open the JMC client executable file.On the command line, start the JMC lient by entering
jmc
or the the full path to the JMC executable.JAVA_HOME\missioncontrol\jmc.exe
- On the JMC Client screen, create a new connection from the File menu, choose your JVM, and start JMX console.
As the result you should be getting an overview page with Processors, Memory consumption, Java heap use, JVM CPU usage, etc.
Chapter 3. Configuring Red Hat build of OpenJDK to run with customized heap size
Red Hat build of OpenJDK 11 for Microsoft Windows can be configured to use a customized heap size.
Prequisites
- Installed Java Runtime
Procedure
Run the application by adding maximum heap size option to your java command line. For example to set the maximum heap size to 100 megabytes use the
-Xmx100m
option.$ java -Xmx100m <your-main-class>
Additional resources
Revised on 2024-05-09 16:46:07 UTC