I still see projects using Java 5...
In addition to benefiting from the new features, being up-to-date is good for recruiting. You tell someone they'll be working with Java 6 and (in the absence of other evidence) they'll assume it's a legacy product suffering from chronic under-investment. Not exactly the impression you want to give job seekers!
Or Android.
The speed at which they stop freely supporting older versions feels much like a way to squeeze big, slow moving organizations for support contracts.
Are you serious? Even the worst shops I've been at have at least moved their JVMs to Java7 back around 2014. I mean you can take all your existing JARs from Java4 and run them on Java8 and nothing should break. Recompiling them might be another issue, but still not a huge one.
Having said that being on and old supported version of these products means you are at least enjoying Java 6.
What do you think those medium sized business apps are built off of if not things with JVM dependencies? It's not so simple.
Some ideas that would bring people back:
* Wildly new, terse, and clear syntax and a great library of built-in tools that are briefly and intuitively named.
* Easily write and design interfaces that generate both/either back-end or matching integrated front-end code which is off in its own directory and can easily be used by existing JavaScript and HTML.
* Similarly be able to generate the JavaScript front-end code that use those JS client libraries with easily writable/pluggable generators so that it can generate Angular 1.x, 2, ReactJS, Bootstrap, etc. in "best-practice" ways that can be updated frequently as the community changes.
* Simultaneously provide the option to serve very similar pages using straight HTML, degrading even to the point that a text only browser could use the site easily.
* Easily define responsiveness of pages.
* Support multiple 3D, 4D, etc. interfaces with customizable inputs to be forward-compatible without overdoing complexity (i.e. it's really pluggable).
* Similarly support generation of almost any kind of service integration, with easy pluggable authN/R.
* Easily scalable.
* Relational, noSQL, versioning DB (noms) support.
* Make fun books for kids and a site where they can share what they've written, write games, build things, etc.
* Make it integrate with every browser, even some older versions, operating systems.
* Make it compile low-level vs. byte code so it's fast as shit.
I don't think Java needs any help in that department given how crazy popular it is.
And Android has made it even more popular than it ever was these past eight years.
Java has a few issues but the learning curve is not one of them.
Kotlin
> great library of built-in tools that are briefly and intuitively named.
I dunno, guess this depends on what you need. The Java class library has so much in it, but I guess it's not overly intuitive due to the age of a lot of the packages. Personally, I don't think I'd have a hard time getting my .Net-loving colleagues accustomed to everything as is.
Java EE is another matter entirely, I gave up on it after the Java EE 8 clusterfuck that's going on and have just decided to use Spring for everything.
> Easily write and design interfaces that generate both/either back-end or matching integrated front-end code which is off in its own directory and can easily be used by existing JavaScript and HTML.
What are you looking for here? Automagic API's? spring-data-rest says hello. I still find it's better to write my own, but if you need something for a quick prototype there you go.
> Easily scalable.
How are you wanting to scale? Where is your bottleneck? This isn't on the language to solve, it's how you design your application. I can throw up 2,000 instances of an application, but whether the database behind it can handle 100K/tx/sec is another story entirely.
> Relational, noSQL, versioning DB (noms) support.
We've had JDBC, JPA, jOOQ, QueryDSL, etc, forever for the relational story. There's plenty of support out there for various NoSQL databases (Spring even has spring-data-cassandra which I am looking at using right now for an ES/CQRS design).
> Make it integrate with every browser, even some older versions, operating systems.
Why? Java in the browser is dead. If you want to write client-side stuff just use JavaFX and package using WebStart or an installer that bundles your JRE and dependencies.
> Make it compile low-level vs. byte code so it's fast as shit.
Java is already "fast as shit". The warmup time for HotSpot and initializing the JVM is probably the big complaint everyone has, but unless you are writing small command line tools it is a complete non-issue.
With that said, Java 9 will support limited AOT compilation of modules to reduce the time to get basic compiled versions of your classes - HotSpot will still profile the compiled modules, and if finds it is required it will deoptimize, re-profile through bytecode interpretation and reoptimize - just like it does with normal .class files (which are still required to run).
Java's going to be around a long time. Those that stick with it will be fine. COBOL programmers made a lot of money in 1999, and some people still use Fortran.
But, Java's original big mantra was "write once, run anywhere." Such idealism then. Cool things have been done in the past few years, but can't we do more?
AOT compilation is not automatically faster than JIT compilation. Java already is fast as shit. If you're worried about that first 100 milliseconds, works is being done on AOT compilation.
Of course without runtime profiling the AOT built code may not be optimized for the hot path correctly, HotSpot will still deoptimize in this case and begin profiling again - so it's not going to be suitable for everything until they allow you to capture profiling details and feed it into the AOT compiler.
Generic Specialization
Reified Generics
Native Function Calling
Native Data Access
New Data LayoutsEdit: It seems removing unsafe is just a rumor.
specialized generics. this is a huge one, too, less boxing is always a win.
JEP-286 less typing.
Maybe Project Panama and maybe a even better AOT.
Compared to what JDK 9 brings, this is huge. JDK 9 brings a Module system which was already possible (and a lot of stuff around it which didn't exist), a new GC algorithm, Tiff Image I/O, jshell, ALPN, http2 client, reactive-streams. (P.S.: not everything is complete here, but this stuff will probably be used by most)
JDK9 mostly brings stuff that was already missing and provided by other libraries. JDK10 will probably change a lot of more things in the JVM ecosystem.
Also, I don't think this falls under Valhalla (and I'm not sure if it's been committed yet), but the possibility of reasonable type inference in Java 10 would make me rather happy.
http://openjdk.java.net/jeps/228 - Add More Diagnostic Commands. For example more insight into JIT:ed methods and the code cache.
http://openjdk.java.net/jeps/158 - Unified JVM Logging. Logging from the JVM, e.g. GC logging and classloader logging, are configured and printed uniformly.
http://openjdk.java.net/jeps/259 - Stack-Walking API. Efficient API for walking the current call stack.
I'm really glad I get to do Scala development full time. Even with all the recent improvements to Java 8, I feel the future of Java isn't the language, but the JVM and all the other languages that run on top of it (Scala, Groovy, Clojure, JRuby, etc.)
See http://download.java.net/java/jdk9/docs/api/java/util/zip/CR....
I see no JSON, I have to use a 3rd party lib. And ... no word on fixing logging divergence.
http://paste.debian.net/883460/
( May be incredibly unsafe, only just thought of it now. )
https://docs.oracle.com/javaee/7/api/javax/json/package-summ...