JDK 9 General-Availability Release
jdk.java.net
jdk.java.net
Imagine being able to run Pandas and Reactjs and Spring using the same runtime.
https://github.com/graalvm/truffleruby
Java is now officially signalling that it wants to make building new languages as the future of Java.
Graal is also probably going to define the future of the JDK internals as well. http://mail.openjdk.java.net/pipermail/discuss/2017-Septembe...
But java9 is general availability for this .
"The aim of this project is to expose VM functionality via Java APIs. Namely, we want to make it feasible to write in Java a dynamic compiler and interpreter for a language runtime. [...] Building on the compiler, we aim to develop a multi-language interpreter framework. Java will be just one member in the family of supported languages. The use of partial evaluation will allow the framework to deliver competitive performance."
This compiler and framework sounds like an attempt to provide a foundation for more Groovy/Grails-style ecosystems to be built on the JVM.
Graal: http://openjdk.java.net/projects/graal/
Grails: https://grails.org
The words graal and grail do share a common etymology, but the projects aren't related.
This AOT compilation feature is interesting, didn't know that it is in JDK9 ... will it allow JDK9 libraries run on iOS? http://openjdk.java.net/jeps/295
"AOT compilation of any JDK modules, classes, or of user code, is experimental and not supported in JDK 9."
...Unclear (to me) what that means
The Java 10 dev branch already has quite a few improvements.
Initially not, but, iOS is specifically mentioned here http://bugs.openjdk.java.net/browse/JDK-8167428
1. you need to compile on the exact same CPU make on model that you will run on (for now there's not cross compilation)
2. you need to compile with the exact same memory settings, including GC selection, that you will run on
3. unless you're cool with binaries that are hundreds of megabytes you will first need to do a profiling run an determine which classes and methods you want to compile
4. you will need to decide if startup time or ultimate performance is more important than you
5. in the end you probably get a better startup time out of -noverify
As a result, this doesn’t work with Java 9 the same anymore, as basically all that stuff has been moved around.
- some Java EE technologies that are tradionally part of Java SE as well, won't resolve by default when compiling/running on the classpath (JAXB will be the most noticeable)
- JDK 9 strongly encapsulation internal implementation classes (think of types in com.sun.* and sun.* packages). When running on the classpath, there's a lenient form of strong encapsulation: you will get a warning on the console when reflectively using these types. In time, this lenient mode will be switched to a more strict enforcement. Ergo: time to wean code off the dependencies on internal implementation classes
The first restriction you'll probably run into (if you for example have a Spring application). The second restriction is more an issue for library maintainers (though you should start complaining to said maintainers if your application starts printing warnings)
All in all, it's not a 100% drop-in replacement, but it's close enough for most scenarios. The trick is to make sure your application will keep running in the future as well, when a more strict strong encapsulation regime will be enforced for classpath-applications as well.
(full disclosure: I'm author of Java 9 Modularity, O'Reilly, which covers many migrations scenarios as well. See https://javamodularity.com)
Still, no major language enhancements...
This[1] is the best summary of what is in the release that I've read. The first section discusses language enhancements. Lots of cross references to JSRs and other material.
They'll probaby cherry pick some other language features along the way to Java 10.
https://www.sitepoint.com/ultimate-guide-to-java-9/#collecti...
I wonder how this is going to play out if it starts getting use. I'm guessing we'll see two types of jars published on Maven, maybe Jigsaw enabled and regular? (e.g. <classifier>jigsaw</classifier>?)
Edit: Also, I was sure Jigsaw was approved in the end; that's why we've had to wait until September.
> JDK 9 downloads are larger than JDK 8 downloads because they include JMOD files so that you can create custom run-time images. To learn about JMOD files see the Project Jigsaw Quick-Start Guide and JEP 282.
Intel didn't vote at all. (on previous vote Intel voted yes)