I’m using NetBeans 12.5 running with JDK 11 on macOS 11.6
My project is configured in the build script to use the JDK 17 toolchain.
The NetBeans project properties have:
Sources -> Source/Binary format: 17
Build -> Compile -> Java Platform: JDK 17
The Navigator view is stuck at “Please wait…” for every file in the project.
Various newer constructs,. like:
if (x instance of Region r) {
r.blah();
}
are not parsed properly - The "Action Items” view shows various parsing errors
like:
')’ expected
‘;’ expected
‘not a statement
cannot find symbol symbol: variable r location: my.fully.qualified.Thing
I do have nb-javac installed because I have to work any many projects that are
stuck on Java 8.
If I change NB to run with JDK 17 (Zulu build with JavaFX):
The parsing issues go away. But there are still a few issues...
NB reported:
An error occurred during parsing of
‘javafx.controls/javafx/scene/control/SplitPane.java in
/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/lib/src.zip’.
Please report a bug against java/source and attach dump file
‘/Users/scott/Library/Application
Support/NetBeans/12.5/var/log/SplitPane_3.dump’
(tried to report this but couldn’t get Jira to attach the dump file.)
NB 12.5 fails to properly load some Gradle projects when it is running on JDK
17.
Even though the projects will build and run fine from within NetBeans it seems
the Gradle APIs that initially load the project are using Gradle 7.0 but I have
Gradle 7.2 set for what to use with the projects.
At least one project reports:
- Could not run build action using connection to Gradle installation ‘<path to
gradle -7.0 in the gradle wrapper cache>'
- Supplied javaHome must be a valid directory. You supplied:
/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home
I have no idea where it is getting that path. It may be the default for Oracle
Java 17 on macOS, but it isn’t where my Java 17 is. My path (and this is the
path returned by the '/usr/libexec/javahome’ tool) is
/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists