简体   繁体   中英

Should native DLL and JRE address models match?

Can 32 bit native DLL be loaded from 64 bit JRE? If not what is the best solution? Should user install both 32 and 64 bit versions of JRE?

Thank you.

Both 32-bit and 64-bit versions of the JRE would need to installed and used accordingly. Note, this is not requirement of the JRE but of Windows. From Programming Guide for 64-bit Windows :

... 32-bit processes cannot load 64-bit DLLs for execution, and 64-bit processes cannot load 32-bit DLLs for execution.

如果要使用64位JVM但需要使用32位DLL,则可以同时运行两者,并在需要DLL执行某些操作时让64位JVM与32位JVM通讯。

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