Which Hotspot VM?

person Bijeshfolder_openJavalocal_offer, access_time September 23, 2008

Did you know that the Java VM ships with two different binaries? Yes, there’s a client VM and a server VM. They differ in various compilation policies and (in particular) heap defaults. While the client VM can be used for applications that require quick start-up and low memory footprint, the sever VM is – well – for “server” like applications. The server VM is started up by default on “server-class” machines. See  Ergonomics in the 5.0 Java[tm] Virtual Machine for definitions. 

Sadly, my dev box – a 32-bit intel running MS Windows – does not qualify as “server-class”. I would have to start up java with the “-server” switch all the time. This can be impractical when I am using someone else’s ant scripts, etc. So what can I do?? Well, there is another unsupported (and mortal) way. Edit the file “jvm.cfg” found in $JAVA_HOME\jre\lib\i386. Move the server entry to the top of the list and you are set to go.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>