Java Netbeans 无法打开项目或任何东西
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43546590/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Netbeans can't open project or anything
提问by Alejandro Mayorga
I have this problem: Netbeans runs and I can create a new project, but if I click on an open project or open a file the programs exit and close. Also when I tried to add the .jardriver to create a connection it does the same thing. So I can't add or open anything.
我有这个问题:Netbeans 运行,我可以创建一个新项目,但是如果我单击一个打开的项目或打开一个文件,程序会退出并关闭。此外,当我尝试添加.jar驱动程序以创建连接时,它也会做同样的事情。所以我无法添加或打开任何东西。
Things to know: I bought a new SSD for my laptop, I did a clean installation. It's a Windows 10 creator update 1703 compilation (the last build). I re-downloaded Netbeans, fully uninstalled it, and then installed it again and I can't solve the problem.
须知:我为我的笔记本电脑买了一个新的 SSD,我做了一个全新的安装。这是一个 Windows 10 创作者更新 1703 编译(最后一个版本)。我重新下载了Netbeans,完全卸载了,然后重新安装,还是无法解决问题。
采纳答案by TomS
The problem is related to this bug in Java JRE 1.8.0_131-b11. https://bugs.openjdk.java.net/browse/JDK-8179014
该问题与 Java JRE 1.8.0_131-b11 中的此错误有关。 https://bugs.openjdk.java.net/browse/JDK-8179014
It only happens when Windows 'God Mode' is active (read the comments).
只有在 Windows 的“上帝模式”处于活动状态时才会发生(阅读评论)。
Uninstall JRE 1.8.0_131-b11 and delete the 'God Mode Folder' on the desktop and the problem is gone. I was able to reinstall Netbeans and it is running fine.
卸载JRE 1.8.0_131-b11,删除桌面上的“上帝模式文件夹”,问题就解决了。我能够重新安装 Netbeans,并且运行良好。
回答by Fairoz
Right it is due to the issue https://bugs.openjdk.java.net/browse/JDK-8179014which is already investigated. This issue only observed on Windows 10 x64, build 1703. Deleting the GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} will resolve the issue
没错,这是由于已经调查过的问题https://bugs.openjdk.java.net/browse/JDK-8179014。此问题仅在 Windows 10 x64, build 1703 上观察到。删除 GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} 将解决该问题
回答by Pepito Gonzales
Instead of the reinstallation you need to clean up from files the "C:\Users\Username\AppData\Roaming\NetBeans\8.1" folder.
您需要清除“C:\Users\Username\AppData\Roaming\NetBeans\8.1”文件夹中的文件,而不是重新安装。
回答by Uddhav Gautam
If you had Netbeans installation over Java 9then Please note Netbeans does not work with Java 9. Proof: https://forums.netbeans.org/topic68000.html
如果您在Java 9 上安装了 Netbeans,那么请注意Netbeans 不适用于 Java 9。证明:https: //forums.netbeans.org/topic68000.html
This solution is for Windows, but the same logic is applied in Linux too.
此解决方案适用于 Windows,但同样的逻辑也适用于 Linux。
Solution1:You have to edit netbeans.conffile to your java installation path. You can find netbeans.confinside etcfolder of Netbeans installation folder. (By default is the program files folder)
解决方案1:您必须将netbeans.conf文件编辑到您的java安装路径。您可以netbeans.conf在etcNetbeans 安装文件夹的文件夹中找到。(默认是程序文件夹)
Make your netbeans.conflike below.
Eg, netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.8.0_144"
在netbeans.conf下面做你喜欢的。例如,netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.8.0_144"
Solution2:-- If you don't want to edit your netbeans.conf.
解决方案 2:- 如果您不想编辑netbeans.conf.
Install java 8(32 bit or 64 bit whatever). Copy jdk1.8.0_144and jre1.8.0_144folders from program files (x86)/java /to program files/java/. Inside program files/javafolder, rename jdk1.8.0_144to jdk-9and jre1.8.0_144to jre-9.
安装java 8(32 位或 64 位任意)。复制jdk1.8.0_144和jre1.8.0_144文件夹从program files (x86)/java /到program files/java/. 里面program files/java的文件夹,重命名jdk1.8.0_144,以jdk-9和jre1.8.0_144到jre-9。
You are done.
你完成了。
回答by Shanmukh Gudivada
You can replace it by yourself by just adding the following line in .conf file in the netbeans installation directory folder:
您可以自己替换它,只需在 netbeans 安装目录文件夹中的 .conf 文件中添加以下行:
netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_191
netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_191
回答by uzx 619
make sure the path of netbeans.exeor netbeans64.exedoesn't have numbers or non-english characters.
确保路径netbeans.exe或netbeans64.exe没有数字或非英文字符。
回答by Ace Jasper Noora
You should consider the path of the folder. Mine is just on desktop, then I moved it inside another folder. I got the same issue, then I put it back on its original place and everything works fine again.
您应该考虑文件夹的路径。我的只是在桌面上,然后我将它移到另一个文件夹中。我遇到了同样的问题,然后我把它放回原来的位置,一切又正常了。

