在Netbeans中设置JRE [英] Setting JRE in Netbeans

查看:102
本文介绍了在Netbeans中设置JRE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的PC中安装了JDK 1.6,JRE6和JRE7(64位和32位).

I have JDK 1.6, JRE6 and JRE7 (64-bit & 32-bit) installed in my PC.

我正在使用Netbeans 7.3 BETA 2,并且正在使用JDK 6和JRE 6.

I am using Netbeans 7.3 BETA 2 and it is using JDK 6 and JRE 6.

我想将其更改为JRE7.我怎样才能做到这一点?

I want to change it to JRE7. How can i achieve this ?

我已经检查了Stackoverflow本身,发现我们必须将netbeans_jdkhome值的netbeans.conf文件内容更改为新Java路径的路径.

I have checked in Stackoverflow itself and found that we have to change the netbeans.conf file content for the netbeans_jdkhome value to the path of new Java path.

在另一个stackoverflow问题中,我找到了如何指定哪个要在Netbeans中使用JRE吗?.

In another stackoverflow question, I found How to specify which JRE to use in Netbeans?.

但是,在这一点上,我也无法找到解决方法.有人可以帮忙吗?

But, in this also, I am not able to find how to get this resolved. Can anybody help on this ?

我的安装路径如下,

JDK6路径-C:\ Program Files(x86)\ Java \ jdk1.6.0_31

JDK6 path - C:\Program Files (x86)\Java\jdk1.6.0_31

JRE6路径-C:\ Program Files(x86)\ Java \ jre6

JRE6 path - C:\Program Files (x86)\Java\jre6

JRE7路径-C:\ Program Files(x86)\ Java \ jre7(32位)

JRE7 path - C:\Program Files (x86)\Java\jre7 (32-bit)

JRE7路径-C:\ Program Files \ Java \ jre7(64位)

JRE7 path - C:\Program Files\Java\jre7 (64-bit)

谢谢.

推荐答案

转到工具->平台

单击添加平台",浏览到要添加的JDK的安装位置....

Click "Add Platform", browse to the location where the JDK you want to add is installed....

点击要添加的JDK,然后选择完成"

Click on the JDK you want to add and select "Finish"

更新项目

通过右键单击项目节点并选择属性,然后选择Libraries,可以更改项目使用的平台.在这里,您可以更改项目用来构建类的平台.

You can change the platform that projects use, by right clicking the project node and selecting properties and selecting Libraries. Here you change the platform that the project will use to build the classes with.

您还可以更改Netbeans期望使用的源/二进制格式(版本).例如,您使用JDK 7,但是为Java 6构建/开发

You can also change the source/binary format (version) which Netbeans is expecting to use. For example, you use JDK 7, but build/develop for Java 6

更改Netbeans本身用于运行的JDK

转到{install/location/of/Netbeans}/etc并打开netbeans.conf.

有一个名为netbeans_jdkhome的属性(该属性接近文件的结尾).您将其更改为希望与NetBeans一起启动的JDK

There is a property called netbeans_jdkhome (it was towards the end of my file). You change this to what ever JDK you want Netbeans to be launched with

这篇关于在Netbeans中设置JRE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆