Change Default Java VM to Client

client, fedora, java, jvm

Solution

The default setting is defined in the file jvm.cfg. A content like

-client KNOWN
-server KNOWN

defines the client as the default.

-server KNOWN
-client KNOWN

sets the server as the default.

Source: www.rgagnon.com/javadetails/java-0566.html

jvm.cfg location

Unknown Mac OS X version:

`/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/jvm.cfg`

Mac OS X version 10.9 without installing JDK:

`/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jvm.cfg`

Mac OS X version 10.9 with installed JDK version 1.8.0_u92:

`/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/jvm.cfg`

You can find your `jvm.cfg` from the command line (Terminal.app) using the command `$ locate /jvm.cfg`. You might need to update your locate database first, using the command: `$ sudo /usr/libexec/locate.updatedb`

Problem

I installed Oracle's Java on Fedora 17, and I noticed that when using the command `java -version` it returns this ``` java version "1.7.0_05" Java(TM) SE Runtime Environment (build 1.7.0_05-b05) Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode) ``` Java seems to run the -server option by default. The help text came up as ``` -server to select the "server" VM The default VM is server, because you are running on a server-class machine. ``` Is there any way to change the default to client?

Original source

Related problems