The latest expert opinions, articles, and guides for the Java professional.
The different flavors of Java
Java Standard Edition (SE) lets you develop and run Java applications. Java main virtues are performance, portability and versatility of devices that support running it, from servers to desktops and embedded devices.
Java SE 8, the latest version, now supports different profiles. A profile is a smaller runtime environment that includes less functionality, but provides a number of benefits. Some of them are:
- It can be better optimized for better performance and faster start up.
- A smaller runtime is much easier to bundle with the application, which leads to better distribution.
- Enhanced security, because the area for attacks are smaller.
Java Enterprise Edition (EE) is a standard that runs on top of Java SE. It’s an enormous runtime platform that has multiple independent implementations of each and every part. Java EE is developed by the community with the help of industry experts and provides an excellent, mature, open platform solution to cover most enterprise needs.
Java Micro Edition (ME) is an runtime environment for on embedded and mobile devices in the Internet of Things.
Various implementations of Java
There are multiple implementations of the JVM specification and to be a certified JVM, an implementation must pass the Java Compatibility Kit (we’ll discuss this in detail later). For now we want to give an overview how large and lock-in free the JVM ecosystem is.
HotSpot is the official JVM implementation maintained by Oracle Corporation. Full name is “Java HotSpot Performance Engine”. This is what you get from https://java.com/download.
OpenJDK is an open source implementation of the JDK developed initially by Sun Microsystems in 2006. OpenJDK is free software, licensed under GNU GPL license with the linking exception. OpenJDK is now a reference implementation and it’s source is used by Oracle to build their HotSpot JVM.
A proprietary JVM originally developed by Appeal Virtual Machines and acquired by BEA Systems in 2002, became part of Oracle Fusion Middleware in 2008. Main features of JRockit were JRockit Mission Control management console and performance and memory monitoring tools, and alleged performance and scalability ease. In 2011 JRockit became free and Oracle announced plans to port notable JRockit features to OpenJDK.
This JVM was developed by IBM and focuses on having superb portability and easy scaling on any platform, from a mobile phone to supercomputer mainframes.
Zing is a scalable JVM implementation for Linux by Azul Systems. Zing shines at a massively multicore platforms, with memory heaps reaching hundreds of gigabytes. Zing uses a proprietary Continuously Concurrent Compacting Collector, which avoids stop-the-world pauses that typical Garbage Collection implementations require to process memory of Java applications.
Let’s do a quick count: we have HotSpot, which is based on OpenJDK, but alternatively you can go with JRockit, IBM J9 or Zing from Azul. That’s 5 different implementations of the official JVM that developers can choose from. But wait a sec…how can so many implementations with so many moving parts be in sync and work without any real major hiccups for so many years? One word:
This is where we turn to some experts on standards in Java, which is how such a large and diverse community can work together without screwing up everyone’s apps everywhere.
An important role of the JCP is to maintain standards, and thus enable interoperability. If all you have is a framework, even if it is open sourced, then it’s likely that applications built on top of that framework will differ from each other in small or large ways as the framework itself evolves, and as developers use it in different ways. The discipline of detailed specifications and strong conformance test suites make it possible to develop multiple implementations while ensuring that those who program to these implementations will not be locked in to a particular one. PHP is a good example. This language has been around for 20 years and has never had a formal specification. Recently, Facebook decided that they needed to replace the default Zend Engine with their own optimized virtual machine. The only way for them to figure out how the language was supposed to behave in many cases was to examine the actual Zend implementation. Obviously this was unsatisfactory, which is why they announced at this year’s OSCON that they are working on a formal specification for the language.
Bottom line: if you want multiple implementations you need formal specifications (standards). Big organizations that develop world class applications will always want a choice of multiple implementations that are compatible (interoperable) with each other so they aren’t locked in.
– ANONYMOUS EXPERT
Leave a comment