如何在Mac OSX 10.7 Lion上运行32位Java [英] How to run 32-bit Java on Mac OSX 10.7 Lion

查看:211
本文介绍了如何在Mac OSX 10.7 Lion上运行32位Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我使用Windows 7(64位)和Java的经验,32位JRE使用更少的内存并且运行速度明显快于64位JRE(假设您不需要或从拥有大量内存中受益)。我想同样的事情也适用于Mac OSX(和其他平台)。

From my experience with Windows 7 (64-bit) and Java, a 32-bit JRE uses less memory and runs significantly faster than a 64-bit JRE (provided you don't need or benefit from having a lot of memory). I imagine the same thing is true for Mac OSX (and other platforms) as well.

我目前正在运行OSX Lion(v10.7),我已经安装了标准的Java应用程序。在Java Preferences下,我看到Apple Inc.中的Java SE 6对于两种CPU类型32位和64位版本1.6.0_26-b03-383。我已经更改了首选顺序,将32位版本放在64位版本的顶部,希望这会使32位版本默认。

I am currently running OSX Lion (v10.7), and I have installed the standard Java app. Under Java Preferences, I see "Java SE 6" from "Apple Inc." for both CPU-types "32-bit" and "64-bit" version "1.6.0_26-b03-383". I have changed the preferred order to put the 32-bit version on top of the 64-bit version, hoping that this would make the 32-bit version default.

但是java -version仍然说:

But "java -version" still says:

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511c)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-383, mixed mode)

默认情况下是否可以使用32位版本?怎么样?

Is it possible to use the 32-bit version by default? And how?

此外,是否有人在32/64位版本之间有关于速度和内存效率的经验/比较测量?

Also, does anyone have experiences / comparative measurements regarding speed and memory efficiency between the 32/64-bit versions?

推荐答案

我现在发现,可以使用-d32开关显式启动32位JVM。

I found out now, that the 32-bit JVM can be explicitly launched using the -d32 switch.

在我的机器上,java -version -d32表示:

On my machine, "java -version -d32" says:

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-383-11A511c)
Java HotSpot(TM) Client VM (build 20.1-b02-383, mixed mode)

尽管它没有这么说,但它是一个32位的JVM。

and although it doesn't say so, it is a 32-bit JVM.

这篇关于如何在Mac OSX 10.7 Lion上运行32位Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆