Can't create project on Netbeans 8.2

后端 未结 11 770
终归单人心
终归单人心 2020-12-04 08:24

I have windows 10 OS, I just downloaded JDK 9, and Netbeans 8.2 version with All features. When I want to create (Java) project, it just can\'t do it. Doesn\'t give me an er

相关标签:
11条回答
  • 2020-12-04 08:50

    @ubuntu 18.04

    sudo apt install openjdk-8-jdk
    then
    sudo update-alternatives --config java

    
      Selection    Path                                            Priority   Status
    ------------------------------------------------------------
      0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
      1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
    * 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
    
    Press <enter> to keep the current choice[*], or type selection number: 
    

    choose java 8 then restart netbeans
    Done

    0 讨论(0)
  • 2020-12-04 08:51

    I had the same problem I installed NetBeans 8.2 on macOS High Sierra, and by default settings, NetBeans will work with the latest JDK release (currently JDK 9).

    What I did was forcing NetBeans to use JDK 8, you must config your netbeans.conf file, you can find it on:

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

    You need to uncomment and update your path to JDK, you will find yours at:

    /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home

    Just save it, restart NetBeans and you are done!

    0 讨论(0)
  • 2020-12-04 08:52

    EDIT: The solution is to install JDK 8, as JDK 9 and beyond are currently not supported.

    If however, you already have installed JDK 8, then kindly follow the steps outlined below.

    The reason is that there is a conflict with the base JDK that NetBeans starts with. You have to set it to a lower version.

    1. Go to the folder "C:\Program Files\NetBeans 8.2\etc", or wherever NetBeans is installed.
    2. Open the netbeans.conf file.
    3. Locate netbeans_jdkhome and replace the JDK path there with "C:\Program Files\Java\jdk1.8.0_152", or wherever your JDK is installed. Be sure to use the right path, or you will run into problems. Here, JDK 1.8.0_152 is installed.
    4. Save the file, and restart NetBeans. It worked for me, should do for you too.
    0 讨论(0)
  • 2020-12-04 08:54

    If you run in linux, open file netbeans.conf using nano or anything else.

    nano netbeans-8.2/etc/netbeans.conf
    

    and edit jdkhome or directory for jdk

    netbeans_jdkhome="/usr/lib/jvm/java-1.8.0-openjdk-amd64"
    

    you can check your jdk version with

    java -version
    

    or

    ls /usr/lib/jvm
    
    0 讨论(0)
  • 2020-12-04 08:54

    I had the same issue,

    • Quit Netbeans.
    • Delete the JDK9 file in : /Library/Java/JavaVirtualMachines
    • Install the JDK8 : Download link

    Good luck :)

    0 讨论(0)
提交回复
热议问题