Change JDK for OpenDJ 3 from 7 to 8 keeps giving error

Tagged: ,

This topic has 3 replies, 2 voices, and was last updated 6 years, 1 month ago by Ludo.

  • Author
  • #11694

    Currently I have Java 7 being used but I would like to point Java 8 to be used for OpenDJ 3. My current system:

    Linux 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    Following is what I am trying:

    [At this time opendj is already running]

    1. Edit file in /opendj/config file with these values: [earlier it was /usr/local/java/jdk1.7._49/jre] -Xmx4G -server [earlier it was -Xmx256m -server]

    2. In /opendj/bin, run dsjavaproperties for changes to take effect.

    The operation was successful. The server commands will use the java arguments
    and java home specified in the properties file located in

    3. Stop OpenDJ [Server stops successfully]

    4. Start OpenDJ

    I get the following :

    ERROR: The detected Java version could not be used with the set of Java
    arguments -Xms4G -Xmx4G -server.
    The detected Java binary is:
    You must specify the path to a valid Java 7.0 or higher version.
    The procedure to follow is:
    1. Delete the file /apps/opendj/lib/set-java-home if it exists.
    2. Set the environment variable OPENDJ_JAVA_HOME to the root of a valid
    Java 7.0 installation.
    If you want to have specific Java settings for each command line you must
    follow the steps 3 and 4.
    3. Edit the properties file specifying the Java binary and the Java arguments
    for each command line. The Java properties file is located in:
    4. Run the command-line /apps/opendj/bin/dsjavaproperties

    No matter what I try it keeps giving a similar error. I tried doing just steps 1 and in the above suggestions by setting OPENDJ_JAVA_HOME to point to Java 8 and deleting set-java-home file but no change. What am I doing wrong? Any help will be appreciated.

    • This topic was modified 6 years, 1 month ago by Peter Major.

    Could it be that you have installed the 32 bit version of the JRE (i586) and not the 64 bit one (x64) ?


    You were right. Wrong Java. After that just changing file and running dsjavaproperties worked as expected. Sorry to have bothered you and wasting your time. Thank you for your help.


    You’re welcome. I believe the only time I had issues with -Xms and -Xms were for the same reason :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?