r/java • • Jul 30 '21

What is the future of Java?

I'm not asking like is java going to die or will Java be relevant in future. I'm just curious to know about the future of java. What are the upcoming things coming in java that can change the future of it.

173 Upvotes

123 comments sorted by

View all comments

258

u/kartik1712 Jul 30 '21 edited Jul 30 '21

Java will stay relevant in the forseeable future. Lots of awesome work is going on under various OpenJDK projects to improve Java.

Project Loom is working on making it easier to leverage concurrency through virtual threads etc. This will make writing server side applications which are already a Java stronghold easier.

Project Valhalla is working on bringing value based classes (aka user defined primitives) to Java and the JVM.

Project Panama is working on making interop with native libraries and memories simpler. It will also introduce the Vector API to help developers leverage SIMD.

Together, Valhalla and Panama will make Java even more relevant for big data, machine learning and artificial intelligence.

Project Amber is working on bringing new language features (prominently pattern matching) to Java,

There are also ongoing projects like Lilliput which aim to improve the JVM and as a result as languages running on the JVM.

Recently, projects have been also proposed to support Wayland graphics in Java and improving startup times using CRIU and related technologies (Project CRaC).

All in all, the future of Java is exciting and awesome!

5

u/TheMode911 Jul 30 '21

Remains having loom and Valhalla in incubator, hopefully soon

5

u/cogman10 Jul 30 '21

Both appear to be getting real close to the finish line looking at the mailing list. I'd expect one or both to be in preview by Java 18.

2

u/TheMode911 Jul 30 '21

I really hope so, especially Valhalla (I believe that it has been mentioned by a contributor in the mailing list that it would not be in preview at least before jdk 18)

1

u/fdntrhfbtt Aug 02 '21

Loom is already in preview, you can download the preview build.

1

u/cogman10 Aug 02 '21

That's not in preview.

Preview is when loom hits the main jdk branch and you can enable it with a flag.

Loom has early access builds.

1

u/fdntrhfbtt Aug 02 '21

Ah sorry I forgot it was early access. You is right mister.