News for hackers. Stuff that matters.
Re:Java 9 Released by daedalus13 on Thursday September 21, 2017 @04:51PM (#15307235)
Will JVM ever play with the browser again? https://twitter.com/globalmaxima/status/908089963752808448

It would be great if Oracle licensed & worked to get bytecode into chromium and Microsoft did likewise with cil. It will take wasm 10 years to mature anywhere near those two. It'd be nice to not have to wait.

Re:Java 9 Released by skissane on Thursday September 21, 2017 @05:36PM (#15307572)
Even if Oracle were willing to relicense the JVM under more permissive terms, I very much doubt Google/Chromium would agree to include a JVM in Chrome. The experience with applets has been the JVM is difficult to secure for untrusted code execution due to its broad API surface. (Maybe running an untrusted JVM in a sandbox would help with that.) Putting that aside, the JVM is just such a massive code base, I don't think Google/Chromium would want to embed it. And the same comments apply to Apple, Microsoft and Mozilla. And the situation with the equivalent proposal for the CLI is broadly similar.

I think what is plausible is that OpenJDK could support wasm as a platform (as a target for JIT and AOT), and similarly so could .Net. Wasm probably isn't mature enough yet for either to succeed, but I can't see why it can't get there.

Re:Java 9 Released by daedalus13 on Thursday September 21, 2017 @06:44PM (#15307974)
This thread is about Java 9, which includes the Java Module System aka Jigsaw. The JDK itself was modularized. The API surface is now tiny. It would be easy for chromium to whitelist which are the permissive modules. Applets had a different and inferior security model.
Re:Java 9 Released by earenndil on Friday September 22, 2017 @09:17PM (#15317437)
The problem with jvm in the browser is that:

1. Java applets aren't automatically run, you have to click an 'run' button

2. Java can't interact with DOM

JS is built on top of the DOM, and it runs automatically on page load. All JAVAWS has access to is a given section of screen. Honestly, I wish it happens, but I doubt it does. I think chrome would want WASM to succeed and to make everything compile to it because it's a platform they have a significant amount of control over. Which is a damn shame because the JVM is pretty much the best vm out there, and it makes more sense to support it than to try to play catch-up with another VM.

Re:Java 9 Released by shock on Thursday September 21, 2017 @03:20PM (#15306541)
With Java 9, Java finally supports HiDPI on Linux and Windows. MacOS has had HiDPI support since Java 7u40. On Linux it also adds GTK support.
Re:Java 9 Released by shock on Thursday September 21, 2017 @05:26PM (#15307506)
On Linux it also adds GTK support.

Too late to edit: I meant GTK3 support. It supported GTK2 just fine even before JDK 9.

Re:Java 9 Released by shock on Thursday September 21, 2017 @04:02PM (#15306857)
I was pretty excited about AOT compilation⁰, but it seems it doesn't support dynamically generated classes and bytecode i.e.: lambdas and invokedynamic.

⓪ - http://openjdk.java.net/jeps/295

Re:Java 9 Released by pjmlp on Thursday September 21, 2017 @05:05PM (#15307344)
It is work in progress, the Java 10 dev branch already has much better support, including macOS and Windows, according to the Java Languages Summit 2017 talks.

In any case, the other JDK vendors with AOT support are still around.

Re:Java 9 Released by shock on Thursday September 21, 2017 @05:21PM (#15307467)
Are there any free JVMs with AOT besides Eclipse/IBM OpenJ9 (of which I've only learned a couple of days ago)?
Re:Java 9 Released by pjmlp on Thursday September 21, 2017 @05:54PM (#15307688)
RoboVM, https://github.com/MobiVM/robovm

Excelsior JET has a free license for open source projects, https://www.excelsiorjet.com/

But the majority of good ones are commercial. All JDK vendors selling JVMs for embedded devices or real-time deployments, do support AOT compilation.

Re:Java 9 Released by blinkingled on Thursday September 21, 2017 @05:16PM (#15307423)
Really? Reading the document I felt AOT was too much pain for too little gain.

This might benefit IDEs with slightly less startup time but with SSDs even that's questionable. And who besides IDE authors is writing desktop apps in Java anyways?

Re:Java 9 Released by shock on Thursday September 21, 2017 @05:30PM (#15307532)
I'd write desktop apps in Java if AOT was available. I'd much prefer Java with JavaFX/Swing/SWT to C++ with QT for cross platform desktop apps. Maybe we'd see Java used for cross platform desktop apps more, instead of the usual Electron app.
Re:Java 9 Released by praseodym on Thursday September 21, 2017 @05:22PM (#15307480)
It might also be useful for scripts and small CLI utilities where interactive invocation is a lot nicer with short startup times.
Re:Java 9 Released by jcdavis on Thursday September 21, 2017 @05:33PM (#15307557)
The main benefactor of AOT will be the JVM itself - part of the reason for its sluggish startup time is having to interpret and then JIT a bunch of core libraries.
Re:Java 9 Released by 0x0 on Thursday September 21, 2017 @03:56PM (#15306807)
Android Studio 2.3 and the corresponding gradle versions embedded in android projects throw a hissy-fit on this java version. Android studio refuses to select the jdk9 directory (says "Please use JDK 8 or newer"), and gradlew quickly fails with "Parsing the SDK, no caching allowed, Failed to notify project evaluation listener, javax/xml/bind/annotation/XmlSchema"...?
Re:Java 9 Released by shock on Thursday September 21, 2017 @04:02PM (#15306863)
They've changed the version string⁰ format. Existing software needs to be updated to parse the new format.

⓪ - http://openjdk.java.net/jeps/223

Re:Java 9 Released by satysin on Thursday September 21, 2017 @03:23PM (#15306561)
Installer is digitally signed August 3rd, why such a long delay until release?
Re:Java 9 Released by shock on Thursday September 21, 2017 @03:28PM (#15306591)
Speculating here, but perhaps they had planned some additional testing and wanted to have plenty of time to fix bugs.
Re:Java 9 Released by satysin on Thursday September 21, 2017 @03:55PM (#15306800)
Looks like they just gave themselves quite a bit of time for testing. http://mail.openjdk.java.net/pipermail/announce/2017-Septemb...