简体   繁体   中英

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.

I have a 32 bit JRE embedded, a program compiled with a 1.5 32 bits JRE. This version of JRE is a constraint and can not be changed.

Can this program use the 64 bit driver ?

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.

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.

Windows 64 has an abstraction layer that will seamlessly grant access to all 32 bit programs to those 64 bit drivers, including the 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).

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. In addition 64 bit machines can access more than 4 GB of RAM without complicated work-arounds.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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