将默认Java VM更改为Client [英] Change Default Java VM to Client
问题描述
我在Fedora 17上安装了Oracle的Java,我注意到当使用命令java -version
时,它会返回
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似乎默认运行-server选项.帮助文字显示为
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?
推荐答案
默认设置在文件 jvm.cfg 中定义.像
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.
来源: www.rgagnon.com/javadetails/java-0566.html
未知的Mac OS X版本:
Unknown Mac OS X version:
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/jre/lib/jvm.cfg
未安装JDK的Mac OS X版本10.9:
Mac OS X version 10.9 without installing JDK:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/jvm.cfg
已安装JDK版本1.8.0_u92的Mac OS X版本10.9:
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
您可以使用命令$ locate /jvm.cfg
从命令行(Terminal.app)中找到jvm.cfg
.您可能需要先使用以下命令更新定位数据库:$ sudo /usr/libexec/locate.updatedb
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
这篇关于将默认Java VM更改为Client的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!