users@javaee-spec.java.net

[javaee-spec users] [jsr366-experts] Re: Java EE APIs hidden by default in JDK 1.9 and removed in JDK 1.10

From: Jason Greene <jason.greene_at_redhat.com>
Date: Wed, 21 Sep 2016 16:22:00 -0500

Hi Bill,

I agree that bundled modules should be implicitly added in legacy mode (classpath execution).

As a general note, in our opinion, there are a number of issues with the current jigsaw implementation that, if not satisfactorily resolved, will prevent it from meeting the needs of dynamic systems such as Java EE and OSGi, which puts at risk our goal of a modular EE9. Additionally there are interoperability issues that will make it difficult for frameworks to support modular and non-modular code.

For those not familiar, a number of the problems that have been raised are located here:
http://openjdk.java.net/projects/jigsaw/spec/issues/

A few of these have proposals are under active discussion on jigsaw-dev.

-Jason


> On Sep 21, 2016, at 3:11 PM, Bill Shannon <bill.shannon_at_oracle.com> wrote:
>
> As described in JEP 261: Module System [1], all Java EE APIs are
> hidden by default for code on the class path. A Java EE application
> server will need to provide its own versions of these APIs, or will
> need to add a --add-modules option to its invocation to expose
> these modules from the JDK. This is just one of the many issues
> Java EE application servers will need to address when running on
> JDK 1.9.
>
> More concerning is the impact on Java SE applications that make
> use of these APIs. Running even a simple program that uses (e.g.)
> JAXB on JDK 1.9 will fail. The "java" command invocation for such
> an application will need to be modified to include the --add-modules
> option, but that option can not be used when running on JDK 1.8.
>
> Alternatively, the jar files for the required Java EE APIs can be
> included in the class path for the application, allowing the
> application to run on JDK 1.9. But if run on JDK 1.8, these jar
> files will be ignored and the versions included in the JDK will be
> used instead.
>
> There is no compatible way to write a Java SE application that works
> on both JDK 1.8 and JDK 1.9 and that uses Java EE APIs such that:
>
> 1. it uses the Java SE versions of these APIs, or
> 2. it uses versions of these APIs packaged with the application
>
> Existing Java SE applications that use these APIs will not run unmodified
> on JDK 1.9.
>
> In addition, it is expected that these APIs will be removed from
> Java SE 10 and their implementations will be removed completely from
> JDK 1.10, as described in the pruning process [2].
>
> If you have concerns about any of this, please let me know, and/or provide
> your feedback on hiding these APIs in JDK 1.9 to the mailing list for the
> Java platform module system specification [3] and your feedback on pruning
> these APIs to the Java SE 9 (JSR 379) expert group [4].
>
> Thanks.
>
>
>
> [1] http://openjdk.java.net/jeps/261#EE-modules
> [2] https://blogs.oracle.com/mr/entry/removing_features
> [3] http://mail.openjdk.java.net/mailman/listinfo/jpms-spec-comments
> [4] http://mail.openjdk.java.net/mailman/listinfo/java-se-9-spec-comments

--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat