你如何确定的Windows 32或64位架构使用Java? [英] How do you determine 32 or 64 bit architecture of Windows using Java?

查看:143
本文介绍了你如何确定的Windows 32或64位架构使用Java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你如何确定的Windows 32或64位架构使用Java?

How do you determine 32 or 64 bit architecture of Windows using Java?

感谢。

推荐答案

请注意, os.arch 属性只会给你的 JRE的体系结构的,而不是基本的操作系统。

Please note, the os.arch property will only give you the architecture of the JRE, not of the underlying os.

如果您在64位系统上安装32位JRE, System.getProperty(os.arch)返回 86

If you install a 32 bit jre on a 64 bit system, System.getProperty("os.arch") will return x86

为了实际确定的基本架构,您将需要编写一些本地code。请参阅<一href="http://mark.koli.ch/2009/10/javas-osarch-system-property-is-the-bitness-of-the-jre-not-the-operating-system.html">this帖子更多信息(和一个链接品尝本地code)

In order to actually determine the underlying architecture, you will need to write some native code. See this post for more info (and a link to sample native code)

这篇关于你如何确定的Windows 32或64位架构使用Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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