Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Netbeans can't open project or anything

Tags:

java

netbeans

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.

like image 470
Alejandro Mayorga Avatar asked Apr 21 '17 15:04

Alejandro Mayorga


People also ask

Why my Java program is not running in NetBeans?

Try to run the code on cmd and try. If it runs successfully, check if you are executing the java class or the project in total. That may be the reason of no output. Else then try reinstalling your NetBeans IDE.

How do I open a project in NetBeans?

In NetBeans IDE, choose File > Open Project. In the file chooser, select the project and click Open Project.

Why is my NetBeans 8.1 not opening?

Open netbeans. conf file of etc folder. Change the path to earlier jdk version which is specified against netbeans_jdkhome property. Now open your NetBeans it will work.


2 Answers

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.

like image 101
Uddhav P. Gautam Avatar answered Sep 21 '22 12:09

Uddhav P. Gautam


I solved the problem on Big Sur Mac OS by editing netbeans.conf, note the "Contents/Home".

netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home"
like image 20
Brayoni Avatar answered Sep 21 '22 12:09

Brayoni