> I like this proposal in principle.

>
> In case i am missing something - what module would be a candidate for
> java.target=11 (as example)?
>

I see the applemenu module as a really nice example:
https://github.com/apache/netbeans/blob/master/platform/applemenu/build.xml#L26
it has two implementations of
https://github.com/apache/netbeans/blob/master/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapter.java
one is for JDK8 using some external binary Apple classes
https://github.com/apache/netbeans/blob/master/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK8.java
and the second is using official JDK9 API like `java.awt.desktop.
PreferencesEvent`
https://github.com/apache/netbeans/blob/master/platform/applemenu/src/org/netbeans/modules/applemenu/NbApplicationAdapterJDK9.java

If we could create applemenu.jdk9 module and move all the logic that
requires JDK9 APIs in there, we would simplify the build scripts. As soon
as we start building with JDK11, we'll be able to create such module easily
by setting `javac.target=9`.
-jt

Reply via email to