简体   繁体   English

在Netbeans 8.2上更改JDK Home

[英]Change JDK Home on Netbeans 8.2

Recently I copied Netbeans 8.2 to new computer and unfortunately the java path are different from previous. 最近我将Netbeans 8.2复制到新计算机上,不幸的是java路径与以前不同。 My machine running on Windows 10 x64. 我的机器在Windows 10 x64上运行。 And when I running netbeans64.exe on bin folder than two popups appear 当我在bin文件夹上运行netbeans64.exe时,会出现两个弹出窗口

cannot locate java installation in specified jdkhome:C:\Users\root\Workspace\root\idk\java\jdk\1.8\bin\

After that, I choose to use default version, than another popup appear 之后,我选择使用默认版本,而不是另一个弹出窗口

cannot find java 1.8 or higher

I've follow instruction to change on /etc/netbeans.conf as below 我按照指示更改了/etc/netbeans.conf ,如下所示

netbeans_jdkhome="C:\Users\root\Workspace\root\idk\java\jdk\1.8\bin\"

But it doesn't works. 但它不起作用。 I can assuring you that inside the folder contains java.exe which is version 1.8 我可以向你保证,文件夹里面包含版本为1.8的java.exe

java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

I had registered that path above on System Environment Variables 我在System Environment Variables上注册了上面的路径

I have tried to use parameter --jdkhome but still got the same result. 我试图使用参数--jdkhome但仍然得到相同的结果。

What wrong with my Netbeans? 我的Netbeans有什么问题? Any other suggestion? 还有其他建议吗? Thanks 谢谢

jdkhome should point to the root of the JDK folder, not the bin folder inside it. jdkhome应该指向JDK文件夹的根目录,而不是其中的bin文件夹。

So it should be: 所以它应该是:

netbeans_jdkhome="C:\Users\root\Workspace\root\idk\java\jdk\1.8\"

or 要么

--jdkhome C:\Users\root\Workspace\root\idk\java\jdk\1.8

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

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