简体   繁体   English

在同时安装32位和64位Java时

[英]On installing Java for both 32bit and 64bit

How do you think set the PATH in Windows 7 64bit to have access to both 32 and 64 bit compilers. 您如何看待在Windows 7 64位系统中设置PATH来访问32位和64位编译器。 I have noteiced that appart from different folders everything such as java.exe , javac.exe , etc. are exactly the same. 我注意到,来自不同文件夹的javac.exe诸如java.exejavac.exe等的所有内容都完全相同。 I believe the first path in the PATH variable (either with 32bit binaries or the 64bit) will take precedence. 我相信PATH变量中的第一条路径(使用32位二进制文​​件或64位二进制文​​件)将具有优先权。

My idea would be to change 64bit compiler's name (java.exe) and class execute program's name (javac.exe) and le't say add 64bit postfix but I am not sure if that would work. 我的想法是更改64位编译器的名称(java.exe)和类执行程序的名称(javac.exe),并且不说添加64bit后缀,但是我不确定这是否可行。 Please advice. 请指教。

Thanks in advance. 提前致谢。

java is not the compiler, that's javac. java不是编译器,而是javac。 Also, the compiler generates the same byte-code on 64-bit as it does on 32-bit. 同样,编译器在64位上生成与在32位上相同的字节码。 Assuming you are using pure Java, the only distinction is in the run-time (or JRE) where a 64-bit JRE can address more memory. 假设您使用的是纯Java,唯一的区别是运行时(或JRE),其中64位JRE可以寻址更多的内存。 If you have native code then you must match the settings those libraries were compiled with . 如果您具有本机代码,则必须匹配使用这些库编译的设置。 But, in general, if you are on a 64-bit system with more then 4 gigabytes of memory, only a 64-bit JRE can use the extra memory. 但是,通常,如果您使用的内存超过4 GB的64位系统,则只有64位JRE可以使用额外的内存。

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

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