The original premise of this blog post was to just talk about backwards compatibility, but it will actually fan out to forwards and sideways (is that a real term?) compatibility also. Interestingly, Java excels for all of these.
Before we start, here are my top 10 favorite things about the Java platform again:
- The Java Compiler
- The Core API
- The Java Memory Model
- High-Performance VM
- Intelligent IDEs
- Profiling Tools
- Backwards Compatibility
- Maturity With Innovation
Put your hands on your back
I’m still running Java applications that were compiled more than 10 years ago, without any changes. These applications are not running on the same infrastructure either; I’ve progressively migrated them across VPS hosts and through different dedicated servers, each time running the latest versions of the JVM. All it took was copying the old JAR and WAR files over, starting the application up again, … and there they were, running in all their glory as if nothing happened. There was no need to check for supported JVM version numbers, peruse feature compatibility matrices, … it really has always been just a drop-in replacement, which is pretty amazing.
The same is true for my source code, I have a huge array of personal Java code that goes all the way back to 1998. It’s a great collection of examples that I can use for writing new software, and it all still works. The Java language has remained very stable, even after introducing new constructs like try-with-resource, generics, auto-boxing, enhanced for loops, string switch statements, typesafe enums, annotations, static imports, varargs, …
Thanks to the backwards compatibility of the language as well as the JVM, the Java community has been able to stand on each other’s shoulders for more than 18 years! Undoubtedly this has been a major contributor to why Java libraries and frameworks cover such a large spectrum of industries and interests.
Push your palms to the front
While it’s very reassuring that newer versions of the JVM are capable of running your older binaries, it’s maybe even more exciting to know that your old applications will automatically benefit from improvements that were made to newer versions of the JVM.
As real machines gets more powerful, so does the Java Virtual Machine and you get to reap the benefits of both without having to worry about educating yourself on low-level semantics. The JVM’s WORA approach ends up having a lot more benefits that just platform abstraction, it actually shields you from platform obsolescence and really allows you to leverage your development investments when the industry moves on.
Examples of this are the generational garbage collector that dramatically increased memory allocation and deallocation performance, JMX monitoring and management that provided visibility over your running applications, real-time profiling that made it possible to pin-point problems in production scenarios, HotSpot’s adaptive optimization that offered up to 10x better execution performance, escape analysis and lock coarsening that made your code better parallelizable, class data sharing that reduced startup time, and much more.
Take a jump to the side
As time moves on, so do operating systems and architectures. Many production servers have moved from Solaris to Linux, quite a few developer machines have migrated from Windows to Linux or Mac OS X, … I personally went through all these migrations, sometimes even jumped back to the other side, to switch to even another one just months later (Windows -> Linux -> Mac OS X -> Linux -> Mac OS X).
It’s super convenient to know that you’ll not be tied down to these environments when developing in Java. Again, this goes further than merely being able to run the code anywhere, it actually liberates you and makes it possible to seamlessly work together with other developers that might have different preferences.
It’s a given that in the future, the whole computer landscape will be completely different. I think it’s pretty damn awesome that not only will the software I wrote decades ago continue to work without problems, but also what I will write in the coming decades will similarly face no barriers, and everything will continue to peacefully coexist!
Slide back to the start
My next blog post will conclude this series by looking at the future of Java in Part 10 – Maturity with Innovation. Do let me know what you thought of the ten reasons that I came up with, maybe I missed a few, or maybe you disagree? You can reach me on Twitter at @gbevin and @ZeroTurnaround.
Do you like RebelLabs content? You can see a lot more on our new All Reports page–23 beautifully-designed technical guides are right this way…