2

While trying to resolve another problem, I noticed my AdoptOpenJDK JRE (build 11.0.6+10) was running in client mode on my Windows 10 desktop with 64 GB of RAM.

java.vm.name=OpenJDK 64-Bit Client VM
java.version=11.0.6
java.vendor=AdoptOpenJDK

Specifying -server in the VM arguments did not stop it from running in client mode. (I specified -server in the vmargs section of an Eclipse RCP *.ini file.) Neither did modifying jre/lib/jvm.cfg to specify -client IGNORE.

I was able to force it to run in server mode by removing the file jre\bin\client\jvm.dll. That feels like a hack.

Is there a recommended way to force server mode other than -server?

Andy Thomas
  • 84,978
  • 11
  • 107
  • 151

1 Answers1

2

To run the JVM in server mode, you can modify the Java Runtime Environment (JRE) to default to server. You can run Java applications using the server virtual machine by modifying the jvm.cfg file in your Java installation.

This file is located in C:\Program Files\Java\j2reXXX\lib\i386\on Windows and in /usr/java/j2reXXX/lib/i386/ on Linux.

Change the order of execution in the file from

-client KNOWN
-server KNOWN

to

-server KNOWN
-client KNOWN

Above one definitely works.

If you are using Windows then you can try doing registry change also. By default, these services start the JVM using system defaults. However, you might want to change these system defaults for your services.