Using the Server JVM JVMJavaLinuxEmacsWindows
程序员文章站
2024-02-20 18:22:22
...
(From http://kano.net/javabench/#servervm)
Every form of Sun's Java runtime comes with both the "client VM" and the
"server VM." Unfortunately, Java applications and applets run by default
in the client VM. The Server VM is much faster than the Client VM, but
it has the downside of taking around 10% longer to start up, and it uses
more memory.
There are two ways to run Java applications with the server VM:
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.
Every form of Sun's Java runtime comes with both the "client VM" and the
"server VM." Unfortunately, Java applications and applets run by default
in the client VM. The Server VM is much faster than the Client VM, but
it has the downside of taking around 10% longer to start up, and it uses
more memory.
There are two ways to run Java applications with the server VM:
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.
上一篇: Hivemind源代码分析笔记 XML
推荐阅读
-
Using the Server JVM JVMJavaLinuxEmacsWindows
-
How to access HTTP server using Telnet
-
Using Change Data Capture (CDC) in SQL Server 2008
-
Java虚拟机JVM之server模式与client模式的区别
-
找不到类型或命名空间名称“Server”(是否缺少 using 指令或程序集引用?)
-
Connect SQL Server from Linux Client using Windows Authentication and troubleshoot steps
-
JVM调优之(1)——Server和Client模式
-
找不到类型或命名空间名称“Server”(是否缺少 using 指令或程序集引用?)
-
JVM的server模式和client模式 jvmserverclientjava
-
Keeping your data work on the server using UNION_MySQL