java version: 17.0.6
ant version: 1.10.12
Ubuntu 22.04.4 LTS
The build of Netbeans fails with this message:
-do-compile:
[nb-javac] Compiling 10 source files to /media/meca1/GITHUB-NETBEANS/netbeans/platform/api.dashboard/build/classes
[nb-javac] Ignoring source, target and bootclasspath as release has been set
[repeat] error: release version 17 not supported
[repeat] Usage: javac <options> <source files>
[repeat] use --help for a list of possible options
[nbmerge] Failed to build target: all-api.dashboard
BUILD FAILED
/media/meca1/GITHUB-NETBEANS/netbeans/nbbuild/build.xml:635: The following error occurred while executing this line:
/media/meca1/GITHUB-NETBEANS/netbeans/nbbuild/build.xml:630: The following error occurred while executing this line:
/media/meca1/GITHUB-NETBEANS/netbeans/nbbuild/build.xml:665: The following error occurred while executing this line:
/media/meca1/GITHUB-NETBEANS/netbeans/nbbuild/build.xml:648: The following error occurred while executing this line:
/media/meca1/GITHUB-NETBEANS/netbeans/nbbuild/build.xml:630: The following error occurred while executing this line:
/media/meca1/GITHUB-NETBEANS/netbeans/nbbuild/build.xml:677: The following error occurred while executing this line:
/media/meca1/GITHUB-NETBEANS/netbeans/nbbuild/templates/common.xml:208: Compile failed; see the compiler error output for details
First attempt was using the java jdk 17.
Tryied to change the java version to an older one.
Even if the netbeans documentation says 17 is OK.
export JAVA_HOME=/opt/jdk-11
The issue is the same.
Setting JAVA_HOME variable in not sufficient. The PATH environment variable must also point jdk 17.
After fixing this the compilation succeed.