To change the version of java that is used by the server and tools, it is necessary to edit the config/java.properties file and apply the change by invoking bin/dsjavaproperties with no command line options. Also, the server must be restarted for the change to take affect.

Inside config/java.properties, alter the value of default.java-home to point to the java correct JRE. Any time the config/java.properties file is updated, the bin/dsjavaproperties tool must be run to apply the new configuration.
$ bin/dsjavaproperties