mac netbeans java,在Mac OS High Sierra上安装NetBeans 8.2 /在Mac OS High Sierra上安装NetBeans 8.2...

I'm encountering a problem by trying to use NetBeans 8.2 under Mac Os High Sierra. I'm trying to create a new project but nothing happens.

So after few search over the web I seem to understand that my problem is my actual version of Java JDK which is 11.0.

Unfortunately I dont know how to switch my actual version to an earlier one JDK 8.0 which seems to be the one to use for netbean 8.2 ! :/

If anyone knows how to help me I would be really greatful ! :P

Maxime Prieur

解决方案

There are two steps involved in getting NetBeans 8.2 to work:

Download and install JDK 1.8 if it is not already on your machine:

Once JDK 1.8 is installed, update the file netbeans.conf:

Locate file netbeans.conf within the etc directory under the NetBeans installation directory.

It is a text file containing name/value property pairs. Open it in any text editor.

One of the properties it might specify is the path to the default JDK to be used via property netbeans_jdkhome. Therefore locate the line containing the text netbeans_jdkhome.

If line is commented by starting with the # character then delete that character.

In the unlikely event that the property does not exist in the file at all, just insert it at the end of the file.

The property's value should be the path to your JDK 1.8 installation.

In my NetBeans 8.2 installation my entry looks like this netbeans_jdkhome="C:\Java\jdk1.8.0_181", though obviously your path will be different.

Save your change to netbeans.conf and restart Netbeans. Your issue should be resolved.

Alternatively, if you would prefer to use JDK 11, you could take a completely different approach:

Since you already have JDK 11 installed, NetBeans should work immediately.

Notes:

With NetBeans 10.0, individual projects can be configured to use JDK 8, 9, 10 or 11, provided that:

The corresponding JDK is installed on your machine.

The corresponding JDK is also added as a Java Platform within NetBeans (using Tools > Java Platforms > Add Platform...).

On NetBeans 8.2 you cannot use any JDK version > 8.

You can safely install both NetBeans 8.2 and NetBeans 10.0, and even run both instances concurrently. They do not impact each other in any way, though obviously you should not open a project in both instances of NetBeans at the same time.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值