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.
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.
In NetBeans IDE, choose File > Open Project. In the file chooser, select the project and click Open Project.
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.
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.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With