No JDK found installing Apache NetBeans IDE on MacOS Big Sur
Solution 1
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.
Solution 2
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
Solution 3
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
Solution 4
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!
Faisal Hotak
Updated on June 13, 2022Comments
-
Faisal Hotak almost 2 years
I'm trying to install Apache NetBeans IDE on my MacOS Big Sur, but it fails at the beginning
This is my java -version
I tried to edit the .profile or .bash_profile for the java_home as some people said in other answers, but it did nothing.
-
Faisal Hotak over 3 yearsStill no JDK found when trying to install it. My java version now : i.imgur.com/uAaCcI1.png
-
1218985 over 3 years@CloudData What do you see when running javac -version after JDK8 installation?
-
Faisal Hotak over 3 yearsjavac 1.8.0_265
-
1218985 over 3 years@CloudData What version of NetBeans IDE you're installing?
-
Faisal Hotak over 3 yearsApache NetBeans 12, I tried with the 11 too, same problem.
-
1218985 over 3 years@CloudData what command are you issuing to install netbeans?
-
Faisal Hotak over 3 yearsbrew cask install netbeans or the Apache NetBeans 12.0.pkg. Both have errors, telling me to install the jdk. Terminal : i.imgur.com/iUvOrEV.png . Pkg : i.imgur.com/pOJJZaZ.png
-
being_j over 3 yearsI'm also running into the same issue, were you able to resolve this issue @CloudData ?
-
Faisal Hotak over 3 years@being_j I went back to Catalina and I experienced no problems.
-
pablohs1986 over 3 yearsSame bug since yesterday I upgraded to Big Sur ... any solution? it's maddening ... Apple or Oracle's fault?
-
Mark Locklear almost 3 yearsI had to run
brew install adoptopenjdk/openjdk/adoptopenjdk8
(no "cask") -
Nate almost 3 yearsBut, where do you even get 'Apache Netbeans 12.1.app'? Aren't you describing a failure to run the installer? It's the installer that's failing with that msg for me, leaving no .app folder at all.
-
Faisal Hotak almost 3 yearsI tried installing multiple versions of NetBeans, but none of them were working, then I installed the 12.1 version. First time, it didn't work, second time, it worked but I had to do the steps I explained in this answer. I later found it was a problem from MacOS new version. Couldn't really point what it was, but with the updates, now any version seems to work.