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.
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.
Apache NetBeans 12.1 fails to run on Big Sur.
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).
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
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!
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