Java gets going with version 8
Guests
Other programming languages are increasingly using the JRE as a base. This began with ports of old acquaintances like Python or Tcl but now also includes new languages like Scala [4], Ceylon [6], or Groovy [7]. For these languages to run as fast as possible on the Java Virtual Machine (JVM), Java 7 introduced support for dynamic languages (invokedynamic
).
One of the beneficiaries is the Nashorn JavaScript interpreter developed by Oracle, which in Java 8 replaces the old Rhino interpreter of previous versions and offers 100 percent support for the JavaScript specification [8] (Rhino: 95 percent; Firefox 26: 99.3 percent) and much better performance.
In tests against the SunSpider [9] benchmark, Nashorn is, on average, a factor of four better than Rhino; individual tests run up to 40 times faster (Figure 2). This means that not only have the promises of invokedynamic
been redeemed, but JavaScript now provides a lightweight scripting language for Java applications that can be used without additional libraries.
Special Effects
The rich client library Java FX has been through an interesting development (Figure 3). Highly praised in advance of its release as the designated successor of Swing, it was already declared dead after getting off to a false start. It has hardly featured in the media in the past two years, but has since been converted into a normal Java library in the form of Java FX 2.0.
Like SVG, for example, it supports the development of surfaces based on a scene graph, which can also contain widgets like TreeTable
or calendars in addition to graphic primitives such as lines and planes. Java 8 sees FX enter the game in a major way for the first time: Oracle offers it for Linux, Mac, and Windows. Unfortunately, Oracle is not working on the port for Android and iOS itself, and community projects [10] do not always receive the required corporate approval. This is unfortunate, because supporting mobile devices and desktops with a single GUI library would be a killer feature.
Desktop and Mobile
With some exceptions, such as Minecraft, new Java desktop applications are not the rule; today's choice is typically HTML5, which enables manufacturers to save in the desktop department, but at the price of technological restrictions. Although Java FX applications are allowed to access all Java libraries and local files, web applications apply strict limitations. People who viewed the use of local keys and certificates as a necessity a year ago may have been regarded as security nuts, but it has become the standard requirement for enterprise applications and still requires a rich client.
Another application was presented by Jasper Pott and Richard Blair at the last Java One in September 2013. The DukePad [11] is a tablet based on the Raspberry Pi and Linux, with Java FX as the UI. Plans for the hardware are available under the GPLv2; in combination with open source Linux, Java, and Java FX, this means a totally open source device. It will probably not outdo the typical Android tablets in terms of public popularity, but as a basis for kiosk applications or displays on machine controls, it offers an attractive development environment.
« Previous 1 2 3 4 Next »
Buy this article as PDF
(incl. VAT)