简体   繁体   中英

Netbeans can't open project or anything

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 .jar driver to create a connection it does the same thing. So I can't add or open anything.

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.

If you had Netbeans installation over Java 9 then Please note Netbeans does not work with Java 9 . Proof: https://forums.netbeans.org/topic68000.html

This solution is for Windows, but the same logic is applied in Linux too.

Solution1: You have to edit netbeans.conf file to your java installation path. You can find netbeans.conf inside etc folder of Netbeans installation folder. (By default is the program files folder)

Make your netbeans.conf like below. Eg, netbeans_jdkhome="C:\Program Files (x86)\Java\jdk1.8.0_144"

Solution2: -- If you don't want to edit your netbeans.conf .

Install java 8 (32 bit or 64 bit whatever). Copy jdk1.8.0_144 and jre1.8.0_144 folders from program files (x86)/java / to program files/java/ . Inside program files/java folder, rename jdk1.8.0_144 to jdk-9 and jre1.8.0_144 to jre-9 .

You are done.

我通过编辑netbeans.conf解决了 Big Sur Mac OS 上的问题,注意“Contents/Home”。

netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home"

The problem is related to this bug in 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).

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.

您需要从“C:\Users\Username\AppData\Roaming\NetBeans\8.1”文件夹中清理文件,而不是重新安装。

Right it is due to the issue https://bugs.openjdk.java.net/browse/JDK-8179014 which 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

You can replace it by yourself by just adding the following line in .conf file in the netbeans installation directory folder:

netbeans_jdkhome="C:\Program Files\Java\jdk1.8.0_191

确保netbeans.exenetbeans64.exe的路径没有数字或非英文字符。

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.

I am using netBeans8.2 . Just click on Open Project and select old project then all projects load automatically:

示范

Please follow the below mentioned steps to fix this issue:

  1. Close Netbeans if opened
  2. Download Java 8 jdk from https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html
  3. Install it
  4. Delete the folder /java/jdk-13/
  5. Open Netbeans again
  6. Select Yes in the prompt ( To use the newly installed jdk )
  7. Viola you can create new projects and files

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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