Where can I set the JRE/JDK which is used to run Netbeans besides the command line?

荒凉一梦 提交于 2019-11-28 09:44:30
Michael Myers

Try setting netbeans_jdkhome in {NetBeans directory}/etc/netbeans.conf.

# Default location of JDK, can be overridden by using --jdkhome : netbeans_jdkhome="..." # (omitted path, as I have Java in a non-standard location)

Based on the voted answer, here's what I did on my Mac and it worked...

(download JDK from Oracle)
$ vi /Applications/NetBeans/NetBeans\ 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
[...]
#netbeans_jdkhome="/Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/bin/jre"
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!