简体   繁体   English

Java 32位JRE:此JRE可以运行64位程序吗?

[英]Java 32 bits JRE: can this JRE run a 64 bit program?

as a foreword, I have navigated in the different thread without finding the answer. 作为前言,我在不同的线程中导航而未找到答案。 If this question is already answered, could you please post the link ? 如果这个问题已经回答,您可以发布链接吗?

I am using a 64 bits driver on windows 2008 R2 SP1, as the 32 bits version is refusing to install. 我在Windows 2008 R2 SP1上使用64位驱动程序,因为32位版本拒绝安装。

I have a 32 bit JRE embedded, a program compiled with a 1.5 32 bits JRE. 我有一个嵌入的32位JRE,一个使用1.5 32位JRE编译的程序。 This version of JRE is a constraint and can not be changed. 此版本的JRE是一个约束,不能更改。

Can this program use the 64 bit driver ? 该程序可以使用64位驱动程序吗?

I heard about wrapper (?!?), but I am not familiar with them. 我听说过包装器(?!?),但对它们不熟悉。 Is there a wrapper able to do this ? 有包装可以做到这一点吗? Do I have to modify the program to integrate this wrapper ? 我是否需要修改程序以集成此包装器?

Thanks in advance, 提前致谢,

Best regards, 最好的祝福,

Bruno 布鲁诺

You did not compile with a JRE, but with a java compiler. 您没有使用JRE进行编译,而是使用Java编译器进行了编译。

But to answer your question, it is immaterial where and how you compiled your (Java) source code, all that matters is the JVM you running it in. If it is a 32-bit JVM, it won't load 64bit libraries, and vice cersa. 但是要回答您的问题,在何处以及如何编译(Java)源代码并不重要,重要的是运行它的JVM。如果它是32位JVM,则不会加载64位库,并且副切尔萨。

Windows 64 has an abstraction layer that will seamlessly grant access to all 32 bit programs to those 64 bit drivers, including the JVM. Windows 64具有一个抽象层,它将无缝地将对所有32位程序的访问权授予这些64位驱动程序(包括JVM)。 For the same reason you can run any 32 bit program on Windows (like the browser you are most likely using to read this). 出于相同的原因,您可以在Windows上运行任何32位程序(例如您最有可能用来阅读此内容的浏览器)。

Furthermore Java compiles into abstracted byte-code that does not know of 32 or 64 bit, there are just some speed advantages if that program uses many 64 data types (long, double) and is then running on a 64 bit machine, but that is entirely caused by the JVM and not the byte-code itself. 此外,Java会编译为不知道32或64位的抽象字节码,如果该程序使用许多64种数据类型(长,双精度)然后在64位计算机上运行,​​则在速度方面会有一些优势。完全是由JVM引起的,而不是字节码本身引起的。 In addition 64 bit machines can access more than 4 GB of RAM without complicated work-arounds. 此外,无需复杂的解决方法,64位计算机就可以访问超过4 GB的RAM。

But since you tried to install 32 bit driver on a Windows 64 OS and got confused why this doesn't work, yet you run a server installation, I would strongly recommend to do some further reading on this matter before you proceed. 但是,由于您尝试在Windows 64 OS上安装32位驱动程序,并且对为什么此方法不起作用感到困惑,但是您运行了服务器安装,因此强烈建议您在继续之前对此事做一些进一步的阅读。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM