a life of coding

Wednesday, June 16, 2004

Highly caffeinated Java

Word on the street is that Java programs will run significantly faster if the JVM is started in "server" mode, as opposed to the default "client" mode. The following is from www.sys-con.com (also has benchmarks):


Lea explains the two ways to run Java applications with the server VM as follows

1. When launching a Java application from the command line, use java -server [arguments...] instead of java [arguments...]. For example, use java -server -jar beanshell.jar.
2. Modify the jvm.cfg file in your Java installation. (It's a text file, so you can use Notepad or Emacs to edit it.) This is located in C:\Program Files\Java\j2reXXX\lib\i386\ on Windows, /usr/java/j2reXXX/lib/i386/ on Linux. You will see two lines:

-client KNOWN
-server KNOWN

You should change them to:

-server KNOWN
-client KNOWN

This change will cause the server VM to be run for all applications, unless they are run with the -client argument.

0 Comments:

Post a Comment



<$I18N$LinksToThisPost>:

Create a Link

<< Home