How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I ensure DS (All versions) uses the Java settings from java.properties file when starting?

Last updated Apr 8, 2021

The purpose of this article is to provide information on ensuring DS uses the Java® settings in the java.properties file in preference to any environment specific settings. Out of the box, the server and tools run with the default Java Virtual Machine and Java arguments. This article demonstrates how to override the defaults and ensure your new JVM settings are picked up by the java.properties file when DS or its tools are started.


Overview

The java.properties file (located in the /path/to/ds/config directory) contains all the Java properties that are used when DS is launched. The file contains an overview of the properties that can be changed as well as different example scenarios to help you understand what the properties are used for.

See How do I change DS (All versions) to use a different JDK version? for information on what needs changing in this file when you upgrade your Java environment.

Ensuring DS uses the java.properties file

  1. Update the overwrite-env-java-args property in the java.properties file to true: overwrite-env-java-args=true
  2. Restart the DS server or tool to apply this change. 

DS will now always use the properties in the java.properties file.

Checking your work

DS and many of the DS tools that would usually be used with updated properties, print out the JVM details and arguments to both the terminal window and log files on startup; look for the following in /path/to/ds/logs/server.out or /path/to/ds/logs/errors to verify that the correct properties are being used:

[22/Jun/2015:16:39:59 +0100] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381713 msg=JVM Information: 1.7.0_55-b13 by Oracle Corporation, 64-bit architecture, 954728448 bytes heap size [22/Jun/2015:16:39:59 +0100] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381714 msg=JVM Host: ds1.example.com, running Linux 2.6.32-504.16.2.el6.x86_64 amd64, 1967665152 bytes physical memory size, number of processors available 8 [22/Jun/2015:16:39:59 +0100] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381715 msg=JVM Arguments: "-Xms1G", "-Xmx1G", "-XX:+UseConcMarkSweepGC", "-XX:MaxTenuringThreshold=1", "-XX:+UseCompressedOops", "-Dorg.opends.server.scriptName=start-ds"

See Finding current JVM settings section in How do I collect JVM data for troubleshooting DS (All versions)? for further information on checking your JVM settings.

See Also

How do I change DS (All versions) to use a different JDK version?

How do I collect JVM data for troubleshooting DS (All versions)?

How do I tune DS (All versions) process sizes: JVM heap and database cache?

How do I enable Garbage Collector (GC) Logging for DS (All versions)?

Related Training

 ForgeRock Directory Services Core Concepts (DS-400)

Related Issue Tracker IDs

N/A


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.