Netbeans未安装在MacOS Big Sur上 [英] Netbeans does not install on MacOS Big Sur
问题描述
我已经在MacBook Air上安装了Big Sur.已安装Java,但Netbeans安装表明未找到Java JDK.有人有解决此问题的方法吗?
I have installed Big Sur on my MacBook Air. Java is installed but Netbeans install says no Java JDK found. Did anybody has the solution for this issue?
推荐答案
这是我解决它的方法.从命令行运行:
Here's how I resolved it. From the command line, I ran:
/usr/libexec/java_home -V
这将输出您已安装的Java VM:
This will output the Java VMs you have installed:
Matching Java Virtual Machines (4):
14.0.1 (x86_64) "UNDEFINED" - "OpenJDK 14.0.1" /usr/local/Cellar/openjdk/14.0.1/libexec/openjdk.jdk/Contents/Home
1.8.271.09 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_271 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home
1.8.0_251 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home
If you don't see JDK 1.8, then you should go to Oracle.com and install it. Assuming you have 1.8, you should set that as your JAVA_HOME
with the following command:
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home"
请注意,您的位置可能与我的位置略有不同,您应该使用上面运行/usr/libexec/java_home -V
时VM列表中存在的1.8位置.我还建议您将其添加到Shell配置文件中,以便在下次重新打开Shell时设置当前的JAVA_HOME.我将ZSH用作外壳程序,因此命令是:
Note that your location may be slightly different from mine, you should use the location for 1.8 that was present in your list of VMs when you ran /usr/libexec/java_home -V
, above. I would also recommend you add this to your shell profile so that the current JAVA_HOME is set the next time you reopen your shell. I'm using ZSH as my shell, so the command was:
echo 'export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home"' >> ~/.zshrc
现在您快到家了.只要确保您具有自制软件,然后运行brew cask install netbeans
.
Now you're almost home. Just make sure you have Homebrew and then run brew cask install netbeans
.
这应该使您能够毫无问题地安装它,并将其放置在应用程序"文件夹中.
That should enable you to install it without issue and will place it in your Applications folder.
这篇关于Netbeans未安装在MacOS Big Sur上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!