Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No JDK found installing Apache NetBeans IDE on MacOS Big Sur

I'm trying to install Apache NetBeans IDE on my MacOS Big Sur, but it fails at the beginning

enter image description here

This is my java -version

enter image description here

I tried to edit the .profile or .bash_profile for the java_home as some people said in other answers, but it did nothing.

like image 363
Faisal Hotak Avatar asked Aug 25 '20 00:08

Faisal Hotak


People also ask

How do I fix JDK not found on Mac?

Steps to Fix JDK is Missing Error on Mac for NetBeans conf file and find the string "netbeans_jdkhome". If you find this line commented using hash (#), then remove the hash to uncomment. Save the changes to the netbeans. conf file and rerun the NetBeans, and it will start without any errors.

Is NetBeans compatible with Big Sur?

Apache NetBeans 12.1 fails to run on Big Sur.

Why does NetBeans not recognize JDK?

This is only due to javahome path missing. The problem solved. Show activity on this post. If you are certain that you have a JDK installed (and not a JRE), you can specify the location of the JDK on the commandline when starting the installer (as mentioned in the error message you get).


4 Answers

What I did here was the combining of the answers I received.

I installed the latest Apache NetBeans IDE which is the 12.1.

Right-click on : Apache NetBeans 12.1.app -> Show package contents

Go to : /Contents/Resources/NetBeans/netbeans/etc

Open 'netbeans.conf' with text editor.

Search for : #netbeans_jdkhome="/path/to/jdk"

Add the path to your JDK below like this :

netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk-11.0.9.jdk/Contents/Home"

Save.

Run the program.

like image 125
Faisal Hotak Avatar answered Oct 02 '22 16:10

Faisal Hotak


Try installing Java 8.

brew tap adoptopenjdk/openjdk
brew cask install adoptopenjdk8

If you end up in Error: Cask adoptopenjdk8 exists in multiple taps: due to prior workarounds with different instructions, specify the absolute location like this:

brew cask install adoptopenjdk/openjdk/adoptopenjdk8

Once the installation is complete, add JAVA_HOME to ~/.profile and source it.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin

To install NetBeans IDE, issue

brew cask install netbeans
like image 22
1218985 Avatar answered Oct 01 '22 16:10

1218985


A better alternative i found is to install netbeans using homebrew package repository with command which will install netbeans on your machine.

brew install netbeans

enter image description here

like image 34
Aakash Shukla Avatar answered Oct 05 '22 16:10

Aakash Shukla


I So the procedures with setting java_home and that stuff did not work for me. What I did is download the binary zip from netbeans, and opened etc/netbeans.conf. In here, you can simply set the path to your JDK (netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home"), where you'll need to remove the # in front of this line. If you now run bin/netbeans in this folder, you can run netbeans. Let me know if this helps!

like image 23
Daan Hendriks Avatar answered Oct 02 '22 16:10

Daan Hendriks