简体   繁体   English

如何指定在Netbeans中使用哪个JRE?

[英]How to specify which JRE to use in Netbeans?

I have two JRE in my system. 我的系统中有两个JRE。 One is 32-bit and the other one 64-bit. 一个是32位,另一个是64位。 In Eclipse I can configure both and choose which one to use when running my application. 在Eclipse中,我可以配置两者并选择在运行我的应用程序时使用哪一个。

I'm wondering if I can do the same thing in Netbeans. 我想知道我是否可以在Netbeans中做同样的事情。 I've tried to go to Project Properties, Libraries and then tried to configure a new JRE there, through Manage Platforms, but it doesn't accept the directory of my JRE. 我试图去Project Properties,Libraries然后尝试通过Manage Platforms在那里配置一个新的JRE,但它不接受我的JRE目录。 How should I proceed? 我该怎么办?

Be aware that I'm talking about JRE, and not JDK ;) 请注意,我在谈论JRE,而不是JDK;)

EDIT: I managed to make it work by downloading a new 32-bit JDK and selecting its directory. 编辑:我设法通过下载新的32位JDK并选择其目录来使其工作。 I still couldn't make it accept a JRE directory. 我仍然无法接受JRE目录。

Whether or not you can run Netbeans with just the JRE depends on what bundle you have downloaded. 是否可以仅使用JRE运行Netbeans取决于您下载的捆绑包。 In Netbeans 7 only C/C++ and PHP bundles can be run with the JRE. Netbeans 7中,只有C / C ++和PHP包可以与JRE一起运行。

Older versions of Netbeans include more languages under this JRE umbrella, but the principle is the same. 旧版本的Netbeans在这个JRE伞下包含更多语言,但原理是相同的。

The JDK contains the JRE plus tools to debug and compile code, so if you're doing anything Java based apart from just running the IDE, netbeans depends on the JDK. JDK包含用于调试和编译代码的JRE plus工具,因此如果除了运行IDE之外你还在做基于Java的任何事情,netbeans依赖于JDK。

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

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