Cannot find java. Please use the --jdkhome switch

后端 未结 10 1611
生来不讨喜
生来不讨喜 2020-12-15 04:43

I have just installed Netbeans 8.0.2 on CentOS 6.5.

When I try to run it, I get the message

Cannot find java. Please use the --jdkhome switch
         


        
10条回答
  •  执念已碎
    2020-12-15 05:20

    ATTENTION MAC OS USERS


    First, please remember that in a Mac computer the netbeans.conf file is stored at

    /Applications/NetBeans/NetBeans 8.2.app/Contents/Resources/NetBeans/etc/netbeans.conf
    

    (if you had used the default installation package.)

    Then, also remember that the directory you MUST use on either "netbeans_jdkhome" or "--jdkhome" it's NOT the /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/ but the following one:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home //<-- Please, notice the /Contents/Home at the end. That's the "trick"!
    

    Note: of course, you must change the versions for both NetBeans and JDK you're using.

提交回复
热议问题