No JDK found installing Apache NetBeans IDE on MacOS Big Sur

Viewed 15600

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.

7 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.

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

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

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!

Java is usually already installed in Mac OS. Netbeans installation sometimes is the problem. I had the same issue. I resolved it by installing netbeans using brew cask install netbeans. Use the command line instead of trying to download netbeans from the web.

Related