days
1
0
hours
0
6
minutes
1
2
seconds
4
6
JDK 8u40

Java 8u40 brings improved memory management and JavaScript support

Coman Hamilton
Construction image via Shutterstock

Oracle’s latest JDK update brings a number of enhancements to memory management, Nashorn and JavaFX that should be warmly welcomed in the Java community.

Memory management, native packaging and JavaScript are the main themes of Oracle’s latest changes to the JDK, alongside a host of bug fixes. Just in time for the first anniversary of Java SE, the latest minor release doesn’t bring any jaw-dropping new features, but a shower of (minor) improvements that will likely impact nearly all Java developers in some (minor) way.

JavaScript and Project Nashorn

Polyglot developers that like to mix in a bit of JavaScript with their Java will be excited to hear that Project Nashorn’s script engine will now run faster. Nashorn was introduced in Java 8 to make it possible to run both JavaScript and Java on the JVM.

The latest release also adds a Class Filter interface which makes it possible to control which Java classes are accessed by JavaScript code.

Improvements have also been made to the Java Packager Tool, which allows applications to run on systems where there is no Java runtime installed. As well as supporting multiple entry points, the Java Packager Tool’s self-contained applications can now be passed command-line arguments. Oracle explains that this means that the developer has “full control over the runtime and application entry points.”

Memory and performance

JDK 8 now allows for the amount of memory to be reduced in systems using more than one JVM. At the same time, a lambda form reduction and caching enhancement will lower the memory footprint and allow dynamic languages to perform better. The latest version of the JDK aims to create less interruptions while the system frees up memory due to a lower amount of garbage collection.

The JDK will now also respond to “memory pressure” by reducing resource demands in order to avoid Out of Memory Errors, however The Register comments that this might in fact lead to reduced performance.

MUST READ: Ten easy performance optimisations in Java

Oracle has also improved how the Native Memory Tracking diagnostic feature scales on large systems. By enabling the diagnosis of memory leaks, it is hoped that native memory can run without a significant impact on performance.

JavaFX accessibility

Accessibility remains a major focus for JavaFX, which is receiving a public accessibility API for developers, as well as several enhancements for Windows, Mac OS X and even the Mac App store. Oracle comments that “developers using the JavaFX media stack can now gain Mac App Store acceptance and have the opportunity to have their applications released on the Mac App Store.” The latest JavaFX changes include:

  • Support for reading JavaFX controls by a screen reader
  • JavaFX controls are traversable using the keyboard
  • Support for a special high-contrast mode that makes controls more visible to users.

The latest release also adds JavaFX UI controls, a spinner control, a new text formatter and a standard set of alert dialogues.

As always, the changes brought in 8u40 are explained in extensive detail in the enhancements doc.

Oracle claims the latest update will “usher in the next era of Java to enable developers and enterprises alike to cement Java’s role as the backbone of today’s and tomorrow’s revolutionary business solutions.” Meanwhile, anyone still using Java 7 should remember that Oracle will stop updating the older release in April 2015.

Author
Coman Hamilton
Coman was Editor of JAXenter.com at S&S Media Group. He has a master's degree in cultural studies and has written and edited content for numerous news, tech and culture websites and magazines, as well as several ad agencies.

Comments
comments powered by Disqus