6 ms·
JDK 9 General-Availability Release
- deleted 9y ago[deleted]
- 0x0 9y agoAlso discussed here, which links to the full Oracle JDK distribution for windows, macOS, linux and solaris: https://news.ycombinator.com/item?id=15306295 https://news.ycombinator.com/item?id=15306295
- karussell 9y agoSee also the mail from Mark Reinhold http://mail.openjdk.java.net/pipermail/announce/2017-September/000230.html http://mail.openjdk.java.net/pipermail/announce/2017-Septemb... 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 http://openjdk.java.net/jeps/295
- bpicolo 9y agoSeems limited? "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
- stickydink 9y agoAOT initial release in JDK 9 is provided for experimental-only use and is restricted to Linux x64 systems running 64-bit Java with either Parallel or G1 GC. Initially not, but, iOS is specifically mentioned here http://bugs.openjdk.java.net/browse/JDK-8167428 http://bugs.openjdk.java.net/browse/JDK-8167428
- karussell 9y agoThanks also for the link!
- WatchDog 9y agoYou still need a full JVM to execute the compiled code, it's mainly just an optimisation to improve startup time.
- deadc0de 9y agoHere is a talk about it at JVMLS'17: https://youtu.be/n5DCg6M2MDM https://youtu.be/n5DCg6M2MDM
- needusername 9y agoIt sounds interesting until you remember what a hassle native compilation is: 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
- cromwellian 9y agoSo Jigsaw modules are shipped as part of JDK9 even those the JSR was rejected by the community (well, IBM, Redhat, and Maven/et al)? 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>?)
- ad133 9y agoIs that why JDK9 is 350MB (Windows x64) vs 190MB for JDK8u144? I'm off to go explore more, but for something that's meant to be smaller and more modular, this was a bit of a surprise! Edit: Also, I was sure Jigsaw was approved in the end; that's why we've had to wait until September.
- kuschku 9y agoFrom the article: > 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.
- silb 9y agoThe javac compiler has a new option "--release" which can compile against previous Java releases 6, 7 and 8. So the new JDK bundles parts of the previous releases.
- dramm 9y agoYes. Jigsaw was approved with some voters abstaining. https://www.jcp.org/en/jsr/results?id=6050 https://www.jcp.org/en/jsr/results?id=6050
- krzyk 9y agoTo be more clear, only Red Hat abstained (so not voters, but a single voter). Intel didn't vote at all. (on previous vote Intel voted yes)
- vbezhenar 9y agoCan it be used as a drop-in replacement for JDK 8 or there could be compatibility problems with popular libraries? As I understood, modules are optional and won't affect code which isn't modules-ready yet?
- dionian 9y agogenerally with every major release you can compile and target code to earlier JVMs with minimal, if any changes. I've heard that the module system is not backwards incompatible, and I would be shocked if it was incompatible with java 8 code out of the box
- kuschku 9y agoThe problem is that some Java 8 code relies on implementation-specific code in the JVM – for example, JetBrains’ IDEs do. As a result, this doesn’t work with Java 9 the same anymore, as basically all that stuff has been moved around.
- dionian 9y agoas usual they have been working on support in the EAPs, I'm guessing 2017.3 works relatively well with jdk9 by now, but i havent tried yet!
- 0x0 9y agoIt broke android studio's jdk selector and it broke android gradle for me. Also eclipse needed a hack in eclipse.ini to even start. Looks like the ecosystem isn't ready yet.
- stevehiehn 9y agoI just got finished dropping it into a decent size Java8 SpringBoot project. The only thing it broke was something to do with JPA. I had to add some dependency for java.xml.bind and now everything works so thats cool.
- elehack 9y ago
- luizb 9y agoNO language enhancements .... I guess they leave that for the Kotlin guys ...
- dionian 9y agomodules are a massive enhancement that will benefit kotlin as well as any other jvm language
- luizb 9y agoI wouldn't classify that as _massive_ , but it definitely pleases the maven/gradle dudes. Still, no major language enhancements...
- topspin 9y agoThere are a few language enhancements. It's true the 9 isn't a revolutionary release for the Java language, but there are several useful changes. 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. [1] https://www.sitepoint.com/ultimate-guide-to-java-9 https://www.sitepoint.com/ultimate-guide-to-java-9
- virtualwhys 9y agoDon't worry, pattern matching and data classes should be coming in one of the Java 9 feature releases (6 month cycle). They'll probaby cherry pick some other language features along the way to Java 10.
- meta_AU 9y agoJDK9 brings a C1 and C2 JIT compiler for ARM targets without needing an Oracle licence (IANAL). Should be able to get much better performance on ARM now - previously it was interpreted unless you used a custom build with the AArch32 project's C1 JIT.
- sandGorgon 9y agoI'm really excited for Graal which will make high performance Ruby, Python and JS possible. https://youtu.be/5BMHIeMXTqA https://youtu.be/5BMHIeMXTqA Imagine being able to run Pandas and Reactjs and Spring using the same runtime. https://github.com/graalvm/truffleruby 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-September/004336.html http://mail.openjdk.java.net/pipermail/discuss/2017-Septembe...
- jadbox 9y agoDoes JDK 9 set things up for Graal or are you just making a statement on Graal independently of this news?
- sandGorgon 9y agoThe new jaotc is built using Graal. I think (but not sure) that Graal can be used with difficulty on older java. But java9 is general availability for this .
- jerven 9y agoIt start to set up things and the AOT feature uses Graal.
- Yuioup 9y agoIs Graal derived from Grails?
- stewbrew 9y ago"Grails" was derived from "Rails", just with a g prepended. Are you actually asking whether the "Holy Graal" refers to a railway station in heaven?
- vorg 9y agoMore likely "Graal" was derived from "Grails", since the English word grail came from the Old French graal. And from http://openjdk.java.net/projects/graal/ http://openjdk.java.net/projects/graal/ : "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.
- zserge 9y agoTo me JDK9 and Jigsaw sounds like a viable alternative to Electron. Cross-platform, well-known mature language, distributable standalone app bundle includes the runtime and takes ~15-30 MB zipped or ~80MB unpacked on disk (I tried swing UI, but I would expect JavaFX to have similar results). I don't remember RAM usage details (I tried it a few weeks ago), but I wouldn't expect it to be higher than Electron's.