You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compatibility with merged JDK 9 mainline [SPR-13344] #17928
As of 4.2.1, the core Spring Framework is fully compatible with mid-2015 JDK 9 builds already, at runtime as well as for running the framework build.
For 4.3, we aim for full runtime compatibility with the merged JDK 9 mainline, including the current state of the Jigsaw module system which has been developed in a parallel branch for a long time. Note that this not include any actual support for JDK 9 modules yet; this remains a Spring 5 topic.
Gradle doesn't build on JDK 9 build 111, not finding javac for the compile tasks. I'm afraid we'll have to wait for an upcoming Gradle release to address this... which might take a while :-(
Since our remaining timeframe does not allow for proper JDK 9 b111+ setup in Spring Framework 4.3 RC2 anymore, let's rather move this to the 5.0 timeline. I've dropped our previous - now outdated - JDK 9 build support from build.gradle for the time being, both in 4.3 RC2 and in 4.2.6, in particular restoring standard use of AspectJ 1.8.9 over AspectJ 1.9 beta 3 (which is actually older than 1.8.9).
It is still a goal for the Spring Framework 4.3 line to be compatible with JDK 9 in general. We might cover this with integration tests from now on though, not attempting to make that framework generation buildable on JDK 9 anymore. At the same time, we still intend to build Spring Framework 5.0 on JDK 9 (#17778), although even that might not happen before the later milestone phase (~M3).
As of 5.0 M1, with AspectJ upgraded to 1.9 beta 5 and our build script revised to explicitly list dependencies beyond the java.base mode, the codebase and the setup is fundamentally compatible with current JDK 9 builds. This is not just about runtime compatibility, it is about the build executing on JDK 9, and all tests passing (with the notable exception of our JRuby integration test for web script templating).
At the moment, beyond pointing JAVA_HOME to a JDK 9 installation, one needs to do gradlew wrapper --gradle-version 3.0-milestone-2 first since Gradle 2.14 is not able to find the Java compiler on JDK 9 otherwise. Then just do gradlew clean test for a standard run. Once Gradle 3.0 is generally available (expected later this year), we'll upgrade to it by default; at that point it'll literally remain a switch in JAVA_HOME.
For more advanced efforts, consider changing sourceCompatibility and targetCompatibility to 1.9 in our build.gradle script. Compilation also passes but - as per 5.0 M1 - AspectJ and EclipseLink tests are going to fail at runtime. Note that we do not intend to actually switch our build to 1.9 bytecode level in the 5.0 generation, not even for the tests; we might upgrade the latter for 5.1 eventually.
Activity
spring-projects-issues commentedon Mar 25, 2016
Juergen Hoeller commented
Gradle doesn't build on JDK 9 build 111, not finding javac for the compile tasks. I'm afraid we'll have to wait for an upcoming Gradle release to address this... which might take a while :-(
spring-projects-issues commentedon Apr 13, 2016
Juergen Hoeller commented
Since our remaining timeframe does not allow for proper JDK 9 b111+ setup in Spring Framework 4.3 RC2 anymore, let's rather move this to the 5.0 timeline. I've dropped our previous - now outdated - JDK 9 build support from
build.gradlefor the time being, both in 4.3 RC2 and in 4.2.6, in particular restoring standard use of AspectJ 1.8.9 over AspectJ 1.9 beta 3 (which is actually older than 1.8.9).It is still a goal for the Spring Framework 4.3 line to be compatible with JDK 9 in general. We might cover this with integration tests from now on though, not attempting to make that framework generation buildable on JDK 9 anymore. At the same time, we still intend to build Spring Framework 5.0 on JDK 9 (#17778), although even that might not happen before the later milestone phase (~M3).
spring-projects-issues commentedon Jun 15, 2016
Sam Brannen commented
FYI: see my related comments in #17778 regarding building with JDK 9 EA and Gradle 3.0 nightly builds.
spring-projects-issues commentedon Jul 27, 2016
Juergen Hoeller commented
As of 5.0 M1, with AspectJ upgraded to 1.9 beta 5 and our build script revised to explicitly list dependencies beyond the
java.basemode, the codebase and the setup is fundamentally compatible with current JDK 9 builds. This is not just about runtime compatibility, it is about the build executing on JDK 9, and all tests passing (with the notable exception of our JRuby integration test for web script templating).At the moment, beyond pointing
JAVA_HOMEto a JDK 9 installation, one needs to dogradlew wrapper --gradle-version 3.0-milestone-2first since Gradle 2.14 is not able to find the Java compiler on JDK 9 otherwise. Then just dogradlew clean testfor a standard run. Once Gradle 3.0 is generally available (expected later this year), we'll upgrade to it by default; at that point it'll literally remain a switch inJAVA_HOME.For more advanced efforts, consider changing
sourceCompatibilityandtargetCompatibilityto1.9in ourbuild.gradlescript. Compilation also passes but - as per 5.0 M1 - AspectJ and EclipseLink tests are going to fail at runtime. Note that we do not intend to actually switch our build to 1.9 bytecode level in the 5.0 generation, not even for the tests; we might upgrade the latter for 5.1 eventually.