Working with NetBeans 9 with an OpenJDK 10 install on a MacOS Mojave machine.
I teach a course EE333 where we use Java as the basis for our efforts in learning object-oriented design and programming. We had to migrate to NetBeans 9 as NetBeans 8.2 became unworkable in some environments and unsupported. We also went to Java 10. First with Oracle although on November 16, 2018 they started wanting to uninstall it and have users move to Java 11 which I gather is going to have long-term support.
Both the Oracle code and the OpenJDK code for MacOS have a new (to me at least) structure where it has a more Mac-like file structure with a “Contents” folder in between the JDK-name and the “Home” directory. There is also a MacOS folder and an info.plist.
This means that the
JAVA_HOME should be set a bit differently (to
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home) in the ~/.bash_profile configuration file.
There were several errors in the Ant-based building in NetBeans 9 which essentially were stating that it was not possible to find the
java executable and that the RT (runtime) version would be used instead.
In the build.xml file (on lines 120, 121, 127, 362, and 378 on the file I had), there was a path error that may either be just an error or more likely something that is not built correctly for the later JDK versions. This removed a bunch of error messages.
An example (120, 121) of this in diff form (leading spaces removed) is
1 2 3 4
But then, it looks like on restart, NetBeans did not like it and in nbproject/UPDATED.TXT it says
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
which essentially undid the changes. Good news is that the error messages are not (yet) back. I removed the two files noted as removable.
I will try to remember to check the NetBeans 10vc3 to see if the issue still exists.
In the JDK11, JavaFX will be removed from the JDK and become a standalone package to maintain and install. Both NetBeans and Java are on multi-times a year release cycle making it challenging to keep up with things for a class baseline. Hopefully, a stability point is soon. I know many folks are working towards this goal.