Hi Brad,

as Matthias said NetBeans requires at least JDK 11 for the build. In java you generally avoid swapping out the compiler since you can simply swap out the whole JDK - but I suppose that is what you meant by compiler.

The easiest way to achieve this is to make sure that only one JDK is on the PATH - or that the JDK you are interested in is in front of the PATH.

A simple script should do the trick:

export JAVA_HOME=/home/mbien/dev/java/jdk-19.0.2.7.1-corretto
export PATH=$JAVA_HOME/bin:$PATH

# or like Matthias suggested via your home directory - I want my clones to be self contained though when i test PRs, so I set it locally
echo nbjdk.home=$JAVA_HOME > nbbuild/user.build.properties

ant clean -q
ant build-nozip -Dcluster.config=full


there are also lots of tools which can manage java on the path, for example I could simply type

$ archlinux-java set java-19-openjdk

and the linux distribution does the rest. There is also sdkman and probably dozens more.

best regards,

michael

On 04.02.23 23:27, Brad Walker wrote:
I can't figure out what options to use so that doing a build with Ant
compiles with a different compiler. I've looked all over the web page and
can't seem to find it there.

So 2 questions:

1 - Does compiling Netbeans out of the box continue to Java 8 as the
compiler?
2 - What option would I pass to Ant in order for it to use a different
compiler?

-brad w.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to