When it comes to programming languages, there are few that garner as much attention or are the subject of as much debate as Java. Over its 20 year history, the controversial programming language has been pronounced dead numerous times, with many believing the final nail in the coffin had been delivered when Apple – a company that had traditionally been a big proponent of Java – chose to boycott it after it was plagued by a series of security vulnerabilities a few years back. In response, Oracle (who acquired Java from Sun Microsystems in 2010) invested heavily in the language in a bid to close the zero-day exploits that left it susceptible to attacks, along with strengthening the language in general.
However, despite the developers’ best efforts, Java has never been short of critics who choose to question its relevance in programming. Merely typing the term “Java is dead” into a search engine results in a plethora of articles and opinion pieces arguing the merits and (more often) the drawbacks of the language. But those who believe it is a relic, soon to be discarded on the scrap heap of history, are simply short sighted, as its longevity serves as a testament to its developer’s ability to take criticism and use it to refine their language’s features in order to ensure it remains a staple for programmers.
“Because it is old, I think that people assume that, in this modern field of computing, with smartphones and the like, in terms of languages, Java is somehow less relevant due to its age”, said Gregory Thomas, an Android developer at Zinconix. “But Java isn’t going anywhere, at least not anytime soon.”
Thomas believes the language is likely to stick around because, over the course of its life, it has become one of the most stable languages on the market, a quality that is highly sought after in a number of software applications.
Year Java launched
Developers using Java
Unsurprisingly, one place where stability is very important is in financial services and, as Java has this in abundance, it has grown to become rather popular within the industry. In fact, a number of investment banks (such as Goldman Sachs, Barclays and Citigroup) all use Oracle’s language for many front and back-end office applications, including the development of their electronic trading systems.
“Lots of banks still use Java, and financial institutions are not, on a whim, just going to change the language they use”, said Thomas. “They’re going to keep it and ensure that what they have already continues to benefit from the stability Java offers.”
Java’s success with the financial services industry ensures it will continue to be used for years to come, especially when the sector is famed for its use of, and reluctance to update, legacy systems. The stability Java offers has not only made it popular with banks, but has also made it the language of choice for lots of consumer and enterprise applications.
Shortly after Oracle took the helm in 2010, one of the first things it did was release a new version of Java (JDK 7.0), the first new incarnation in more than five years. This year, Oracle announced it would release Java 9 in September 2016, which is meant to break up the language’s many functions into a number of bite sized components, making it quicker and more accessible for users. Such large levels of investment over the last five years have helped revive the language and will ensure the many enterprises that rely on it continue to do so.
Apache’s Hadoop, an open-source software framework, is written almost entirely in Java and is used to for distributing massive data sets. When asked by Datamation Magazine why the developers chose to use Java as its platform, Hadoop’s creator Doug Cutting said: “Java offers a good compromise between developer productivity and runtime performance. Developers benefit from a simple, powerful, type-safe language with a wide range of high quality libraries. Performance is generally good enough. When it falls short, native code has been used to keep overall performance in line with [the] C and C++ [programming languages].
“Some hate Java and complain that another language would have been a better choice, but every language has its detractors. The fact that Hadoop has been widely adopted shows that Java was a reasonable choice.”
Even companies such as Netflix and the mobile payment processing app Square use Java for the bulk of their coding; Oracle’s language provides high levels of performance, as well as the ability to scale up services with relative ease.
“We have thousands of Java processes running all the time, yet as we grow we don’t have huge infrastructure challenges”, explained Netflix’s delivery engineering manager, Andrew Glover, in an interview with European development consultancy Silvae Technologies. “We also have a lot of open source tools that are Java-based, which makes it easy to monitor, upgrade and scale our services.”
One area where Java is not so strong, however, is the front end of web development. According to Thomas, Java’s memory footprint is just a “little too heavy” for many developers, while the likes of Python and Ruby simply beat Java in terms of speed. After all, speed is a massive part of the web browsing experience: users want their browsing to be quick; they want it to be snappy; they want data now.
“I think that Java is a bit too clunky, which is why it is used less by web developers”, said Thomas. “So Java is pretty much dead in web terms, but only up to a point – that point being the amount of processing the site has to do.”
Big web companies such as Amazon, Google, eBay and Kayak all use Java for their backend processing (e-commerce, users and other things that require a lot of communication with their databases). They use it because it’s tried and tested, and is scalable (any backend could deal with one user, but Java can deal with 200m or more quite easily).
The big boys still use Java for its compatibility, reliability and scalability
Smaller sites, on the other hand, do not tend to need to do so much processing and therefore can use newer, faster languages such as Python and Ruby. An example of such a site is the “front page of the internet”, Reddit. The site may boast over 36m users worldwide, but it’s mainly sending a lot of text back and forth and storing it, which doesn’t require the processing power offered by languages such as Java. As a result, the site benefits from using Python – a language that is much faster, more readable and easier to write in than Java, according to the site’s co-founder and former CEO, Steve Huffman.
So Java is perhaps dying in one realm, but very slowly. Websites that have light to middling numbers of users and a similar amount of required processing tend to veer away from Oracle’s language. But the big boys still very much use it for its compatibility, reliability and scalability.
Not only that, but, according to the TIOBE Programming Community Index, which tracks the popularity of different programming languages based on the quantity of lines written in them, Java 8 – the most recent version – is a massive hit. So much so that the index rates it as the world’s most popular programming language, with an almost 4.5 percent lead on the rest of the competition. The cause of this massive rise in the language’s popularity, according to the TIOBE’s report, is the added functionality recent updates have provided.
Prior to Oracle’s acquisition of Sun Microsytems, a number of the language’s key developers jumped ship, with many fearing the end was nigh. “But the doomsayers appeared to be wrong”, said the report. “The release of Java 8 in 2014 is a big leap forward. It is now possible to write Java programs in a functional and concise way. Surprisingly or maybe not, Java is consuming a large part of the market share that [rival language] Objective-C is losing.”
Rather than being close to death, Java is very much alive, and as long as Oracle continues to focus on the language’s strengths rather than trying to be all things to all people, it is likely to be around for many more years to come.