
Java 11 released - chhum
https://www.infoq.com/news/2018/09/java11-released
======
0x0
Noteworthy, the oracle JDK license has apparently changed so you can't legally
use their distribution for much of anything except for the development of
inhouse java applications? So I guess you can't even use it just for its JRE
to run, say, eclipse for PHP development, or to host a servlet web server?
Anyways looks like the OpenJDK is now on feature parity and is GPL licensed.
[https://blog.joda.org/2018/08/java-is-still-available-at-
zer...](https://blog.joda.org/2018/08/java-is-still-available-at-zero-
cost.html)

~~~
random3
With Java 11, there are supposedly no differences between Oracle and OpenJDK
so time to go OpenJDK

~~~
thanatos_dem
One huge difference for enterprise users is release cadence.

OpenJDK will be updated much more rarely, on a quarterly cadence only,
__including for security patches __. So if you go the OpenJDK route, be ready
to do some JDK-level patching yourself if you want to mitigate any zero-days
that surface.

Fixes will also only be applied to the latest versions, so you'll need to be
prepared to live on the bleeding edge and accept all the risks that come with
that.

~~~
itronitron
The slower release cadence of openjdk makes it a good fit for enterprise users
as they tend to also have a slower release cadence. Is anyone even using Java
9 or later?

------
sixstringtheory
I don’t follow Java too closely these days as I haven’t worked in it in years.
Pretty wild that Applets are now removed. I still remember the wonder of being
able to build a compiled application that could run from command line or in
the browser. RIP Applets, long live Java :)

~~~
ChuckMcM
With the removal of applets I feel like the last of the Java that helped build
is gone. The process of working on the development of, and then watching the
weaponizing of Java is one of the more memorable chapters in my career.

For those who weren't there to remember, the concept of Applets, or
applications that ran in a web browser and didn't need an operating system to
run, was apparently terrifying to Microsoft. Sun's senior management exploited
that terror blunt the invasion of Windows desktops in Sun's enterprise
accounts. So many complex technical issues resolved with the test "will it
scare/attenuate Microsoft?" rather than "Is this what the language/system
should be?"

[1]
[https://stuff.mit.edu/afs/sipb/user/marc/hotjava/doc/people....](https://stuff.mit.edu/afs/sipb/user/marc/hotjava/doc/people.html)

~~~
lokedhs
I was working for Sun during those days. They used to have this vision that
everything would be written in Java. They threw everything at that wall, and
ran with the ones that stuck.

I've been in presentations showing all kinds of things being rewritten in Java
just because apparently that was something that needed to be done. I
particularly remembers seeing a NIS (YP) server and and NFS server in Java.
When I asked why they did that, and particularly why they didn't go for NIS+
(which was many years old at the time) or event LDAP, they had no answer.

~~~
ChuckMcM
Java wasn't really good at being a server early on, it was very much 'client
side.' It would have been an interesting exercise for me to implement NIS+ in
it :-)

------
manishsharan
What is Oracle's rationale for the new licensing terms ? It seems
counterproductive to me as it will push developers to use OpenJDK ,which is
pretty good on its own and "unlink" Oracle from Java in our minds. To be
honest, I have climbed through hoops to install Oracle's JDK on my Ubuntu just
out of habit. Now I wont do that because any application I develop on this JDK
cant be put into production.

~~~
geodel
Big companies which need support and security patches after 6 months can get
it from Oracle. Others can update to new OpenJDK after 6 months.

~~~
krn
In other words: OpenJDK is like Fedora, and OracleJDK is like RHEL?

~~~
pjmlp
Yes that is pretty much it.

------
winterbe
I wrote a user friendly version of the release notes. Maybe this is useful to
someone:

[https://winterbe.com/posts/2018/09/24/java-11-tutorial/](https://winterbe.com/posts/2018/09/24/java-11-tutorial/)

~~~
singularity2001
wow, after all these years, the Java syntax for

print(fetch("[https://winterbe.com")](https://winterbe.com"\)))

is still this behemoth:

var request = HttpRequest.newBuilder()
.uri(URI.create("[https://winterbe.com")](https://winterbe.com"\))) .GET()
.build(); var client = HttpClient.newHttpClient(); HttpResponse<String>
response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body()); !?

One can argue about taste, but how can _anyone_ defend such uuuuuuuuurgh?

~~~
ofrzeta
This is really a really weird overdesigned API. Maybe I don't understand the
purpose of it but it seems like an excessive use of design patterns.

Why would you need a Builder method on a static object to create a request
object? Oh well, let me rephrase that: First you instantiate a Builder object
that you need to call the create method on to get a request. Makes no sense to
me.

What not make HttpRequest a concrete class and just instantiate it? If there's
any good reason for that design please enlighten me.

~~~
zbentley
Many use cases want to make a whole lot of pretty similar (URI, creds, method)
requests that vary only in a single way ( e.g. a POST parameter) or don't vary
at all (e.g. polling).

A builder is a convenient way to wrap up those common settings so that they
can be handed to other parts of the code that don't care about them/want to
override specific parts and leave the rest in common.

Now, there are other ways to do that (instantiating a concrete class with
common settings and mutable fields for customizations in a function, and then
passing references to that function to everything that wants the common-
config-defaulted output object). The choice between that kind of strategy (or
an instantiate-and-freeze-early and pass your mutators in, or a refactor-all-
your-code-to-not-mutate strategy etc...) and a builder pattern is a subjective
and debatable one. But the approach taken here is certainly defensible.

------
geodel
Just installed OpenJDK 11 on my macOS machine. Remarkably unfussy install
process. Missed the times when installing will involve accepting license,
multiple clicks on installer GUI and helpful offers for browser toolbars used
to be present :-)

~~~
cs02rm0
Feeling like a bit of a noob, but how did you install it?

I only found a targz download link, didn't understand the contents of it - it
looks like the inside of a macOS application package. The installation
instructions refer to it being for .dmg file, which it doesn't seem to be.

~~~
ssijak
I use sdkman to manage my java versions on osx . It is similar to rvm or nvm.
[https://sdkman.io](https://sdkman.io)

------
gw
One setback with this release is that the javapackager tool, which made native
installers that bundled the Java runtime, was removed (presumably because it
depended on JavaFX) and there is no replacement for it. One is being proposed
at [http://openjdk.java.net/jeps/343](http://openjdk.java.net/jeps/343) but
I'm not sure when that is expected to be done.

~~~
the8472
If your application doesn't do bytecode generation or instrumentation at
runtime then the graal native image compiler might do the job too or even
better.

[https://www.graalvm.org/docs/examples/native-list-
dir/](https://www.graalvm.org/docs/examples/native-list-dir/)

~~~
xienze
> If your application doesn't do bytecode generation or instrumentation at
> runtime

I believe it also has trouble with reflection involving class names that
aren't effectively constant at compile-time. So with that and the other
limitations, there's a whole lot you can't do. Hopefully they can resolve
that.

~~~
calcifer
> reflection involving class names that aren't effectively constant at
> compile-time

Can you give an example?

~~~
xienze
Sure, just about any project that has the concept of plugins. At runtime the
code looks for plugin instances by searching for, e.g., META-
INF/services/<interface_name> on the classpath. Inside that file (or files)
you have implementation class names, which are collected and instantiated.

------
yawz
If you're wondering about the license changes and whether Java is still free
or not, you should have a look at "Java Is Still Free"[1].

[1] [https://itnext.io/java-is-still-
free-c02aef8c9e04](https://itnext.io/java-is-still-free-c02aef8c9e04).

------
MrTonyD
I think that a lot of people misunderstand Oracle. As a former Product Manager
there, I can safely say that Oracle only cares about development tools to the
extent that it furthers their business interests (based on Executive Meetings
I attended). And since Microsoft provides a popular and full-featured
development environment, Oracle is forced to provide an alternative or they
might get shut out of all development projects by Microsoft (in fact, that is
Microsoft strategy as learned by some of our "spies". Or did you think that
Microsoft supports development tools because they want to be in that
business?). In addition, based on meetings with executives from several
Fortune 50 hardware and software vendors, it is clear that transferring as
many costs as possible to open source groups saves money. And, as another
benefit, any bugs or shortcomings can't be blamed on the corporation who sold
them their hardware or software - again saving costs and preventing many
lawsuits (which account for many, many millions paid quietly.) So be careful
about projecting the "myth" of open source on to the companies involved with
open source. The interests they claim are not their real interests. (And since
some HR readers routinely ask me "what proof" and then work to dismiss
anything I write - let me say that I have no proof. Insisting on proof for all
data-points leads to poor judgment. It makes more sense to collect unproven
data-points and assemble those along with known data to craft good judgment.
Honestly I feel sorry for those whose judgment is blinded by their insistence
on legal-level proof. They are mentally disabled.)

~~~
jsight
IMO, your comment would have carried more weight without those last two
sentences. Those seem a bit unnecessarily insulting?

The rest of your comment is relatively consistent with some trends that I've
seen in the development tools communities. I think it is also why it is so
difficult to make money in that space.

------
debacle
Could anyone benevolently compare/contrast the modern development of Java's
ecosystem with that of .NET Core?

~~~
kbsletten
I'm more qualified to comment on .NET but the main difference here is that
Core was basically starting over on .NET from zero to go cross-platform and
then immediately scrambling to get everybody's favorite feature plugged back
in. Java _seems_ to be trying to chip pieces off of the standard library by
either modularizing or like this, just dropping it from the standard offering.

------
gdsdfe
We're still using the 6 FML

~~~
Freak_NL
Ouch. Java 7 and 8 introduced a bunch of very pleasant syntactical fixes that
greatly improved my pleasure in coding Java. What's holding you back on 6?

~~~
pwagland
Probably they are using an "enterprise" J2EE stack that hasn't been updated to
the latest version.

~~~
gdsdfe
Bingo! Ginormous amount of technical debt that nobody is dealing with and
probably not even seeing ... Plus a culture of "if it works don't touch it"
... I am dying inside ...

~~~
itronitron
6 to 7 is an easier switch than 7 to 8, they changed the boolean value of at
least one default runtime parameter in java 8 without telling anyone

------
qwerty456127
Well, removing SOAP is a little too radical. Indeed nobody likes SOAP and it
is mostly used by EE guys but there still probably are many non-enterprise
public SOAP APIs. This makes me wonder if they are going to remove XML support
in the next version :-) Also, JavaFX is amazing, I actually wish it would get
more popular, it feels like the best GUI framework I've seen so far.

~~~
snuxoll
JavaFX getting removed from the JRE/JDK is probably the best thing for it, I
think Gluon and other contributors will do a better job acting as stewards of
it than Oracle.

~~~
pjmlp
I hope they eventually improve the 3D classes, specially shader support.

That and Android support as well.

------
ComputerGuru
Does the new licensing mean someone at Atlassian will try running their apps
on OpenJDK for once instead of keeping it blacklisted?

/methinks probably not. The money is in hosted licenses.

~~~
cowmix
Atlassian is working on supporting OpenJDK across the board.

[https://confluence.atlassian.com/bitbucketserver/supported-p...](https://confluence.atlassian.com/bitbucketserver/supported-
platforms-776640981.html)

[https://jira.atlassian.com/browse/CONFSERVER-16431](https://jira.atlassian.com/browse/CONFSERVER-16431)

[https://jira.atlassian.com/browse/JRASERVER-41589](https://jira.atlassian.com/browse/JRASERVER-41589)

~~~
ComputerGuru
Thanks for the links.

Wow, those issues are from 2009.

------
fermienrico
Pardon my ignorance but as an outsider(I know nothing about Java), why do GUI
applications that use Java are _terrible_? Eclipse IDE comes to mind.

They're hugely clunky. Also, Java based applets that used to run on browsers
were awful.

I'd love to know if this is something to do with Java itself or the way these
apps are developed. I understand they're not using OS's native GUI APIs.

~~~
ptx
Eclipse actually uses SWT, the least terrible Java UI framework! But making a
cross-platform UI framework is just fundamentally difficult, it seems, and is
always a compromise.

With SWT, the upside is that you get native widgets that look and work like
they're supposed to on the platform, but on the other hand, if the same widget
can appear with different sizes, looks and behaviours it's difficult to
customize it, align it nicely and ensure the whole design behaves coherently.

With Swing, the other terrible Java GUI library, you get the same look and
feel everywhere, but that look and feel is wrong on every platform. As well as
slow, ugly and (still!) full of bugs.

Here's a fun Swing bug I noticed yesterday in IntelliJ:

1) Put IntelliJ somewhere in the middle of the window stack, i.e. with some
windows under it and some above it.

2) Switch to a different virtual desktop. (Tested in Xfce on Debian.)

3) Switch back to the desktop with IntelliJ on it.

You will find (or I did, at least) that IntelliJ has moved

a) to the bottom of the stack, if using Jetbrains' bundled JRE;

b) to the top of the stack, if using Debian's JRE.

Some Java developers like to claim that it's just everyone using it wrong, but
Swing is stuffed with these focus-related bugs. I've seen them in every Swing
application now and then, for decades. (It also likes to create windows at the
wrong position only to move them to the right position, and draw things
initially with slightly wrong layout and then redraw them with the right
layout. You can observe this as well in IntelliJ when it starts up.)

~~~
pjmlp
Yes it is using it wrong, because while some issues are indeed Swing interop
bugs with the host GUI, others are lack of skills by not reading canonical
books like "Filthy Rich Clients", written by Chet Haase and Romain Guy, the
guys that drove most of Android rendering stack.

Romain Guy's team recently released Filament,
[https://github.com/google/filament](https://github.com/google/filament)

Back in the Sun days, Romain had a blog about writing nice looking Java UIs,
which eventually lead to the "Filthy Rich Clients" book publication.

------
simlevesque
So they went from 8 to 11 ?

~~~
mdasen
Java 9 and 10 were released. Java has moved to a time-based release schedule
where they release what is ready for each release rather than having things
block releases forever. Every third release is a long-term-support release.
It's similar to Ubuntu where they release every 6 months, but then there's an
LTS release that many people will wait for.

~~~
Freak_NL
So yeah, in essence Java went from 8 to 11 if you look at it as a sequence of
major releases such as 5, 6, 7, 8, and now 11.

I think a lot of developers skipped/will skip Java 9 and 10 (Java 9 is already
unsupported and effectively history), except for testing their builds and
preparing for the Java 8 to 11 migration.

~~~
executesorder66
Java 9 was a major release. Project jigsaw (introducing modules) was a major
change and blocker. Once they got that out of the way they changed the release
cycle, which is why java 10 was released soon after java 9.

So they actually just went from 9 to 11, going by your logic.

~~~
ivan_gammel
It was a major release in terms of features and platform architecture, but it
was not in terms of adoption. Project jigsaw at this moment is a blocker for
upgrade from Java 8 - majority of developers will move from it only when it
sees the ecosystem ready for that step. Now it's not - due to plenty of major
libraries and tools that didn't even start the migration or still have "alpha"
in their version numbers.

~~~
Freak_NL
Also Java 9 and 10 aren't LTS-releases, which in turn causes the ecosystem to
ignore them largely, because they'll be buried and forgotten by the time
they're ready for Java 11.

