I'm sure some of this is a repeat but... Eric Bresie ebre...@gmail.com
On Fri, Jan 14, 2022 at 1:26 AM antonio <anto...@vieiro.net> wrote: > Regarding the adoption of JDK 11 and the future stragety we want to > follow, I have several questions: > > 1. Question I: "sun.awt/sun.swing" classes. > > We're using sun.awt and sun.swing classes in one "dlight" module we're > receiving in the 4th/5th donation. This is because there is an > implementation of BasicFileChooser for remote systems. These classes are > _not_ exported in the new java.awt.desktop module. > Are the needed calls available in the java.desktop [1] module and/or the applicable API associated [2] in it? > Do we want to: > > A) continue using these by adding some "--add-exports" to the build > system to gain access to internal module classes? > > B) comment/remove this jdk-internal specific features in NetBeans? > if I'm not mistaken, I believe that was one of the driving intents of modularity to move away from internal APIs >From JEP 396 in JDK 16 [3] - Encourage developers to migrate from using internal elements to using standard APIs, so that both they and their users can upgrade without fuss to future Java releases. C) Use reflection (and possibly an "--add-opens", note this will have an > ugly runtime dependency, not a build dependency). > Not immediate concern but I believe there are future plans on updates in reflections [4] so be aware. There are plenty of resources for migrating out there [5] [6] [7] [10] [11]. Have to be mindful of API deprecation/removals [8], like javax.xml which was deprecated in Java 9 then removed in Java 11 Tried to document some of these sorts of things here [9] Cheers References [1] http://cr.openjdk.java.net/~iris/se/10/pfd/java-se-10-pfd-spec-01/api/java.desktop-summary.html [2] http://cr.openjdk.java.net/~iris/se/10/pfd/java-se-10-pfd-spec-01/api/java/awt/desktop/package-summary.html [3] http://openjdk.java.net/jeps/396 JEP 396: Strongly Encapsulate JDK Internals by Default [4] https://openjdk.java.net/jeps/416 [5] https://www.infogain.com/blog/java-8-to-11-a-migration-story/ [6] https://stackoverflow.com/questions/60166816/migrating-java-8-project-to-java-11 [7] https://medium.com/@daniel.panagio18/first-steps-of-migrating-from-java-8-to-java-11-98ea9a5eafff [8] https://docs.oracle.com/en/java/javase/11/docs/api/deprecated-list.html [9] https://issues.apache.org/jira/browse/NETBEANS-5349 [10] https://docs.oracle.com/en/java/javase/11/migrate/index.html [11] https://docs.oracle.com/javase/9/migrate/toc.htm