20

I try the command line with JavaHome:

netbeans-trunk-nightly-201803230002-javase-windows.exe --javahome "C:\Program Files\Java\jdk-10"

It should work, but I receive a message:

There is no JRE at the specified location C:\Program Files\Java\jdk-10

enter image description here

Thanks!

Naman
  • 27,789
  • 26
  • 218
  • 353
Tiến Phạm Văn
  • 303
  • 1
  • 2
  • 4
  • On windows, having installed JDK in first place, installing Netbeans is just button click, btw why are using `nightly` builds? those are not stable builds and mend for testing/contribution only. Do you have multiple JDK installed? –  Mar 27 '18 at 00:28
  • from version 9 Java home would be `C:\Program Files\Java` jre will be in that folder not inside jdk folder – Morse Mar 27 '18 at 00:38
  • @Arvind The latest release of NetBeans (8.2) only supports Java versions up to JDK 8. Neither JDK9 nor JDK10 will work. – skomisa Mar 27 '18 at 01:01
  • 2
    As Prateek pointed out, since JDK9 there is no longer any **jre** folder within the JDK directory structure. For Java 10 the structure is **java/jdk-10/...** and **java/jre-10/...** – skomisa Mar 27 '18 at 01:10

3 Answers3

30

Updated on July 31, 2018 to strikethrough obsolete information, and add details on the official release of NetBeans 9.

You are downloading NetBeans from Oracle's site, so you should have no expectation that even the nightly dev build will work with Java 10.

NetBeans is currently being handed over to Apache from Oracle, and there is a development build available for download from Apache in the form of a zip file from here:

https://builds.apache.org/job/incubator-netbeans-linux/

You can unzip that file on Linux, Mac or Windows and it will work with Java 10. Just be aware that it has not yet been formally released; that is a few weeks away.

You can check for bugs and/or report bugs here:

https://issues.apache.org/jira/projects/NETBEANS


UPDATE June 4, 2018

Apache NetBeans 9.0 RC1 was released on May 28. The source and the binary can be downloaded as zip files from here:

https://netbeans.apache.org/download/nb90/nb90-rc1.html

UPDATE July 31, 2018

Apache NetBeans 9.0 was released on July 29. The source and the binary can be downloaded as zip files from here:

https://netbeans.apache.org/download/nb90/nb90.html#_downloading

!!! IMPORTANT NOTE !!!

NetBeans 9 officially only supports Java SE which means:

  • The Project Wizard is limited compared to NetBeans 8.2. For example, it does not even allow you to create a Java web application.
  • Most plugins are not available. The unzipped download of NetBeans does not even allow you to install plugins for Java EE, C/C++, Fortran, Grails, Groovy, PHP etc.

However, it is a simple process to enable that functionality (at your own risk). See the answer to How to get Netbeans 9 to deploy a valid webapp on Tomcat for details.

For an explanation on why the plugins are not available by default see What's Happened to My Favorite NetBeans Plugins?.

skomisa
  • 16,436
  • 7
  • 61
  • 102
  • Apache NetBeans 9.0 RC1 works with Oracle JDK 10 at Ubuntu 18.04. I am glad! – Andrew Krizhanovsky Jun 20 '18 at 12:43
  • I've JRE 10 not JDK10, but it is giving error "can't find java 1.8 or higher" – Sharique Jun 21 '18 at 14:54
  • 3
    In my case, on Windows 10, netbeans64.exe would not start. Gave message box saying could not find Java 1.8 or higher. Editing etc/netbeans.conf, solved issue, thus: netbeans_jdkhome="C:\Program Files\Java\jdk-10.0.1" – jradxl Jun 26 '18 at 17:00
  • @jradxl Interesting, and I'm surprised you had that problem; I would have expected NetBeans to automatically locate your installation of JDK10. Was JDK 10 the only JDK version you had installed on your machine? – skomisa Jun 26 '18 at 18:21
  • @SahanPasinduNirmal OK. To get that resolved create a question describing your problem. – skomisa Jun 28 '18 at 16:56
  • After i go to the java 8 and netbeans work fine. I will wait to official release of new netbeans – Sahan Pasindu Nirmal Jun 29 '18 at 01:28
  • @SahanPasinduNirmal NetBeans 9 has been officially released, and I have updated the answer above. – skomisa Jul 31 '18 at 05:54
  • Just to note: I'm running the release version of Netbeans 9 but it stubbornly kept using my JDK8 installation to run with and there was nothing I could do to persuade it otherwise, probably the only thing to do was to uninstall JDK8 entirely which I'm not doing just yet. I had to do the netbeans.conf trick described by jradxl to get it to run with java 10. – Gimby Aug 09 '18 at 18:57
  • 1
    @Gimby The _"netbeans.conf trick"_ isn't a "trick" at all; it's the correct (and only?) way to change the default JDK, although it is not user friendly, and it would be much better if that functionality was implemented within the IDE. However, once you have set JDK 10 as the default platform through **netbeans.conf** you can remove JDK 8 from NetBeans : _Tools > Java Platforms > select_ **JDK 8** _> click_ **Remove**. – skomisa Aug 09 '18 at 19:46
5

For Windows you can install with NetBeans Extracted bundle :

Open cmd as Admin User

netbeans-XXX-windows.exe --extract

then run

java -jar bundle.jar

Imran Khan
  • 311
  • 4
  • 9
2

Netbeans won't work properly with jdk version 10. Install jdk 8u/17l and everything should go well.

ravikiran
  • 33
  • 6
  • Netbeans 9.0, RC1 seems to work ok for me on Windows 10, with only JDK 10 installed. see my comment above. – jradxl Jun 26 '18 at 17:02
  • 2
    NetBeans 9 works fine with JDK 10. It's NetBeans 8.2 that doesn't support JDK10. But regardless, your answer does not address the question that was asked. – skomisa Aug 09 '18 at 19:55