
JDK 10: General Availability - tronotonante
http://mail.openjdk.java.net/pipermail/announce/2018-March/000247.html
======
sadiq
Something not mentioned amongst the JEPs on the release email is that this
release also fixes a bunch of issues related to running the JVM in a
container. I wrote about some of these yesterday:

[https://www.opsian.com/blog/java-on-
docker/](https://www.opsian.com/blog/java-on-docker/)

Relevant JEPs:

[https://bugs.openjdk.java.net/browse/JDK-8146115](https://bugs.openjdk.java.net/browse/JDK-8146115)

[https://bugs.openjdk.java.net/browse/JDK-8179498](https://bugs.openjdk.java.net/browse/JDK-8179498)

[https://bugs.openjdk.java.net/browse/JDK-8146115](https://bugs.openjdk.java.net/browse/JDK-8146115)

~~~
dordoka
Some support for these was also introduced in JDK 8u131 back in April 2017
[0]. Do you know if these issues are the same ones fixed in JDK 8 or maybe
they have now been backported to JDK 8 and 9?

Thanks!

[0]: [https://blogs.oracle.com/java-platform-group/java-se-
support...](https://blogs.oracle.com/java-platform-group/java-se-support-for-
docker-cpu-and-memory-limits)

~~~
sadiq
JDK 8u131 and 9 had a few improvements but the changes to 10 increase support.

For example, 8u131 and 9 only supported cpu sets whereas 10 includes support
for cpu shares. Available memory detection in 10 applies to the whole of the
JVM rather than just the heap on 8u131 and 9.

~~~
dordoka
Makes sense, thanks a lot for the insight. I've seen some comments on the JDK
10 issues pushing for a backport to JDK 8 and 9, let's hope they are
eventually backported!

------
SCdF
I'm so confused, I didn't even know JDK9 was out yet!

Reading elsewhere they are apparently moving to a 6 month release cycle.

For people using Java in businessey environments, I'd love to hear your
thoughts on this. Do you think you'll be able to keep up with the JDK changing
twice a year? When I was in this game we were always on versions that were
years behind, but maybe this has changed.

~~~
BonesJustice
This release cycle makes no sense to me. We haven’t even finished migrating
all our components to compile with JDK8 yet, though they’ve all been running
against it for a while now. We’re barely even discussing moving to JDK9 at
this point. What company with a reasonably large software base is going to
keep up with a six-month release schedule? Java isn’t a web browser or some
other user application. Who would even _want_ to spend the kind of resources
required to constantly be testing new JDK releases?

~~~
akerro
>This release cycle makes no sense to me. We haven’t even finished migrating
all our components to compile with JDK8 yet

Why is it Oracles fault that you keep your components on Java version that has
been deprecated and support dropped 4 years ago?

>What company with a reasonably large software base is going to keep up with a
six-month release schedule?

What? No. That's now how it works. Every 3rd release is LTS and it support
time is between 6 and 11 years as so far discussed. Java8 won't be supported
after January 2019, Java11 (LTS) will be release in September this year.

> Java isn’t a web browser or some other user application. Who would even
> _want_ to spend the kind of resources required to constantly be testing new
> JDK releases?

You're not supposed to be testing it. You're supposed to write code to a
contract, contract won't or shouldn't change. If you write code that follows
implementation instead a contract (let's say you relay on HashSet order - I've
seen it), it's your fault. We always make sure we write code that follows the
contract. We're migrating our code base to Jigsaw now, after Spring 5 and
SpringBoot1.5 were release with updated dependencies. If Spring and Tomcat
teams made it available earlier, we would be on Java9 months ago.

~~~
derriz
Linus may be occasionally obnoxious but I believe his "don't break user space"
mantra is a significant reason why Linux is so popular. A similar attitude
guided Windows development (until Vista) and it dominated the desktop world.
In comparison your attitude seems user hostile to me. No "user" is interested
in comparing theoretical specs with the behaviour of the reference
implementation. They just want a tool to deliver solutions that work.

For the first time in years, I'm looking at alternatives to Java for my next
project. Java was always seemed to offer a pragmatic compromise in terms of
language design and features and the availability of developers and libraries.
Rapid breaking releases destroys most of the value of Java for me.

~~~
akerro
>Rapid breaking releases destroys most of the value of Java for me.

Almost nothing is broken in Java. Jigsaw modified who to use reflection to
access data in an insecure manner. You should not be doing that in the first
place for obvious reasons. But the code that was using reflection still works,
you just get a warning when starting an application. That's all.

>No "user" is interested in comparing theoretical specs with the behaviour of
the reference implementation

So you're probably not going to write any code in any strong-typed programming
language, all of them have some kind of contracts you should/have to follow.

Do you know that Oak source code (what Java was called before) still compiles
and runs in Java10?

~~~
derriz
I'm not sure how you can confidently assert that "almost nothing" breaks with
Java 9. Maybe we were just unlucky that the very first application (a simple
less than 20KLoC JavaFX Gui) we used to test upgrading to Java 9 broke
immediately. But actually googling "Java 9 breakage" returns a ton of results
so I guess our experience wasn't an outlier.

You are just repeating that it's fundamentally the user's fault because they
"should not be doing that". A properly designed tool prevents incorrect usage.
If a version of Java allows you to do something and that something proves to
be very useful to GET THE JOB DONE, then I'm with Linus - the blame is not
with the user.

For example, there was simply no alternative to using Unsafe in the past to
get reasonable Java performance for certain task. The fact that it was there
allowed me to resist the pressure to move a significant part of our codebase
to C++. Of course we "should not be doing that" (using Unsafe) but the
alternative was abandoning a large existing code base and hiring a bunch of
C++ experts or retraining our existing developers or spending 10 times as much
on our server capacity. Using Unsafe was a simple pragmatic decision. You
cannot say it was "wrong" without knowing all the factors that went into the
decision.

This is why I like Linus' stance in this case.

~~~
throwaway2048
For what its worth, every single java application I use broke entirely with
java 9.

~~~
ljw1001
My only experience with it was after giving a Java 8 jar to someone who ran in
on a Java 9 jvm and it crashed immediately.

This is the first time that has happened to me in nearly 20 years of using
java.

------
he0001
Reading through the comments and I’m amazed how people are so darn negative to
this. Most of the time people complain about how old java is and the are much
more “modern” options. And now suddenly when they finally picking up the pace,
you whine like bunch of kids that lost their candy...

------
b15h0p
It does not seem to be uncommon to recommend staying away from the non-LTS
releases. It is probably not only up to you whether or not your software
supports the next JDK release; all your tooling and libraries need to do so as
well.

See [http://blog.joda.org/2018/02/java-9-has-six-weeks-to-
live.ht...](http://blog.joda.org/2018/02/java-9-has-six-weeks-to-live.html)
for more insight.

------
WHoWHo
Sad var/val (or var/let) didn't make it.

All good Java developers I know make all local variables final to force better
code.

~~~
merb
var is inside jdk10...
[http://openjdk.java.net/jeps/286](http://openjdk.java.net/jeps/286)

~~~
chrislynch42
var seems like a bad idea to me. One of the things I like about Java is
(strong?) typing. Recently learning C# and was put off by 'var'. Why is it a
good idea?

~~~
ceronman
'var' in C# and Java doesn't change strong or static typing at all. It's just
type inference. Your code is still statically typed, the compiler and IDE will
catch errors. It's just that it's smart enough to infer the types of redundant
things instead of making you type it.

So instead of typing:

    
    
      AbstractConcreteFactoryFactory factory = new AbstractConcreteFactoryFactory();
    

You can just type it only once:

    
    
      var factory = new AbstractConcreteFactoryFactory();

------
ptx
How does Class-Data Sharing – which they've now extended to include
application classes – interact with the new "jimage"-format files (e.g.
lib/modules) introduced in Java 9? Will the jimage file also be efficiently
memory-mapped, making CDS superfluous, or should they be both be applied?

~~~
needusername
There is disappointingly little information available on jimage so it's hard
to compare. jimage does require you to be fully modular while CDS does not.
OTOH CDS is quite a bit tedious to set up.

------
sorokod
Release notes: [http://www.oracle.com/technetwork/java/javase/10-relnote-
iss...](http://www.oracle.com/technetwork/java/javase/10-relnote-
issues-4108729.html)

------
fareesh
I'd be really interested to know if there are folks out there who enjoy Java
programming as compared to the alternatives out there today.

Does Java fill any kind of niche aside from maintaining those gargantuan
projects that are typical of governments and large corporations?

When I learned Java in the 90s, it was hyped up with the promise of microwaves
and refrigerators and televisions and every little thing running Java
software.

Instead, the only time I've found myself turning to Java was when I built an
IDE on top of eclipse for a custom programming language, a few android apps, a
few swing projects for school, and a few socket based projects. When dealing
with IOT and smaller hardware, I've found myself using node(js) instead.

I've rarely ever found it enjoyable. The IDEs have been sluggish, the GUI
libraries have felt cheap and unpolished, with those clunky diamond shaped
radio buttons, and I always found myself writing too much code to do very
simple stuff, because every library was wordy and verbose. When I looked at my
work, it felt inelegant and cumbersome.

What is Java like in 2018? Are there any good, polished open source projects
that work well ? What would make you look at a project and say "I think Java
is the most suitable choice for that" today?

------
mrsheen
I'd wait for 10.0.1:
[https://twitter.com/tagir_valeev/status/976293600681115648](https://twitter.com/tagir_valeev/status/976293600681115648)

------
ksec
When will GraalVM / SubstrateVM be part of JRE?

*Still hoping Oracle will be so good to allow TruffleRuby download without all the signing up and agreement.

~~~
akerro
Some parts of Graal (like ahead of time) were added in Java9 on Linux 64bit,
rest of the Graal was added to Java10, but also only for Linux 64 bit. Graal
is pretty much workable but there are some edge cases that crash your code or
the JVM, eg. Ruby generally works, but Ruby on Rails doesn't.

------
ThatHNGuy
what about OpenJDK with OpenJFX? Building by myself it's an overkill task (it
requires Qt for Webkit), especially on more platforms. I think it's a pity
there are no public available releases of OpenJDK with included JavaFX out
there.

When Oracle will remove it in Java11, it would be even worse

~~~
ris
I agree this is something which should be prioritized, but I don't necessarily
think the answer should be to just provide pre-built binaries. I feel really
uneasy about open source projects that are almost impossible to build by
anyone by the authors - more work should go into making the build process less
obscene.

------
smackfu
Does anyone know why java.com only offers to install Java 8 for a desktop
user?

------
StreamBright
Does anybody know which release is going to be the a long time supported
release? Should I stay on JDK8 for now?

~~~
mavroprovato
Java 11 will be the next LTS, see here:
[http://www.oracle.com/technetwork/java/eol-135779.html](http://www.oracle.com/technetwork/java/eol-135779.html)

So if you care about long term support, you should stay on JDK8

~~~
w4tson
That’s not the advice Mark Reinhold gives. From the talk I saw some give last
year he advises moving with the versions.

If it’s one thing we’ve learned in software it’s embrace the change. Little
and often is the way to stop technical debt accruing

------
rizalp
Why is JDK9 & JDK10 is quite huge 197MB? Much bigger than JDK8 which only use
75MB

------
corpMaverick
Does anyone know how the spring framework will deal the Java versions ?

~~~
oweiler
See
[http://joshlong.com/jl/blogPost/java-10.html](http://joshlong.com/jl/blogPost/java-10.html)

