Java version 8 update 40 has been released by Oracle. This is the latest version available for users who run Java on their PCs. Java is a programming language and computing platform. It is also a software package that runs on more than 850 million personal computers worldwide. There are lots of applications and websites that will not work properly unless you have Java installed.
New Features and Changes
Java Packager Tool Enhancements
JDK 8u40 release contains the following enhancements to the Java Packager:
- Command-line arguments can be passed to self-contained applications. Default arguments are defined when the package is created, which can be overridden by the user when the application is started. See Passing Arguments to a Self-Contained Application
- File associations can be set up when a self-contained application is installed so that the operating system automatically runs the application for registered file extensions or MIME types. See Associating Files with a Self-Contained Application
- The
UserJvmOptionsService
API is available for altering JVM options in self-contained applications. The new settings are used the next time the application is started. See Customizing JVM Options in Self-Contained Applications - Multiple entry points are supported for self-contained applications, which enables a suite of products to be bundled into the same application package. See Supporting Multiple Entry Points
Deprecated APIs
The endorsed-standards override mechanism and the extension mechanism are deprecated and may be removed in a future release. There are no runtime changes. Existing applications using the ‘endorsed-standards override’ or ‘extension’ mechanisms are recommended to migrate away from using these mechanisms. To help identify any existing uses of these mechanisms, the
-XX:+CheckEndorsedAndExtDirs
command-line option is available. It will fail if any of the following conditions is true:
-Djava.endorsed.dirs
or-Djava.ext.dirs
system property is set to alter the default location; or${java.home}/lib/endorsed
directory exists; or${java.home}/lib/ext
contains any JAR files excluding the ones that JDK ships or- any platform-specific system-wide extension directory contains any JAR files.
The -XX:+CheckEndorsedAndExtDirs
command-line option is supported in JDK 8u40 and later releases.
Multiple JRE Launcher feature Deprecated
The Launch-Time JRE Version Selection or the Multiple JRE Launcher feature is deprecated in JDK 8u40. Visit http://openjdk.java.net/jeps/231 for further information. Applications that require specific Java versions deployed using this feature must switch to alternate deployment solutions such as Java WebStart.
JJS Tool Page Differences
The Japanese version of the jjs help page is different from the English version. Some of the unsupported options have been removed from the English version of the jjs tool page. The Japanese version of document will be updated in future.
See 8062100 (not public).
For other jjs tool page changes, see Tools Enhancements in JDK 8.
Java SE Tools Updated
Java SE tools have been updated. See Tools Enhancements in JDK 8 for details.
Change in default values for G1HeapWastePercent and G1MixedGCLiveThresholdPercent
The default value for G1HeapWastePercent
was changed from 10 to 5 to reduce the need for full GCs. For the same reason the default value for G1MixedGCLiveThresholdPercent
was changed from 65 to 85.
Nashorn Enhancements
The new jdk.nashorn.api.scripting.ClassFilter
interface enables you to restrict access to specified Java classes from scripts run by a Nashorn script engine. See Restricting Script Access to Specified Java Classes in the Nashorn User’s Guide and 8043717 (not public) for more information.
The Nashorn compiler now has static type inference capabilities for local variables and expressions. While JavaScript is hard to analyze statically, Nashorn is able to generate code optimized for specific types.
Nashorn now supports optimistic typing, which complements static type inference. For types that can’t be statically inferred, Nashorn will make optimistic assumptions and gradually deoptimize when assumptions turn out to be wrong. To activate this feature use the --optimistic-types=true
option. See Nashorn Architecture and Performance Improvements for more information.
Function.prototype.bind
and Function.prototype.call
are enhanced to work on everything that can be invoked in Nashorn, such as POJO methods, instances of @FunctionalInterface
classes.
Issues with Third party’s JCE Providers
The fix for JDK-8023069 (in JDK 8u20) updated both the SunJSSE and and SunJCE providers, including some internal interfaces.
Some third party JCE providers (such as RSA JSAFE) are using some sun.* internal
interfaces, and therefore will not work with the updated SunJSSE provider. Such providers will need to be updated in order for them to work with the updated SunJSSE provider.
If you have been impacted by this issue, contact your JCE vendor for an update.
See 8058731.
Re-enabled Encryptions in Solaris Crypto Framework
If you are using Solaris 10, a change was made to re-enable operations with MD5, SHA1, and SHA2 through the Solaris Crypto Framework. If you experience a CloneNotSupportedException
or PKCS11 error CKR_SAVED_STATE_INVALID
message with JDK 8u40, you should verify and apply the below patches or newer versions of them:
- 150531-02 on sparc
- 150636-01 on x86
Troubleshooting Guide Updates for NMT, JMC, and JFR
The Native Memory Tracking (NMT) is a Java Hotspot VM feature that tracks internal memory usage for a HotSpot JVM. Native Memory Tracking can be used to monitor VM internal memory allocations and diagnose VM memory leaks.
VM enhancements page is updated with NMT features. See Java Virtual Machine Enhancements in Java SE 8
Troubleshooting Guide is updated with NMT features. See Native Memory Tracking
Troubleshooting Guide is also updated with content for Troubleshooting using Java Mission Control,
Debug Memory Leaks using Java Flight Recorder (JFR), and Troubleshooting Performance Issues using JFR.
JavaFX Enhancements
Starting with JDK 8u40 release, JavaFX controls are enhanced to support assistive technologies, meaning that JavaFX controls are now accessible. In addition, a public API is provided to allow developers to write their own accessible controls.
Accessibility support is provided on Windows and Mac OS X platforms and includes:
- 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.
See 8043344 (not public).
JDK 8u40 release includes new JavaFX UI controls; a spinner control, formatted-text support, and a standard set of alert dialogs.
- Spinner Control:
A Spinner is a single line text field that lets the user select a number or an object value from an ordered sequence. See javafx.scene.control.Spinner class for more information. - Formatted Text:
A new TextFormatter class provides text formatting capablity for subclasses of TextInputControl (for example, TextField and TextArea). See javafx.scene.control.TextFormatter class for more information. - Dialogs:
The Dialog class allows applications to create their own custom dialogs. In addition, an an Alert class is also provided, that extends Dialog, and provides support for a number of pre-built dialog types that can be easily shown to users to prompt for a response. See javafx.scene.control.Dialog, javafx.scene.control.Alert, javafx.scene.control.TextInputDialog, javafx.scene.control.ChoiceDialog classes for more information.
See 8043350 (not public).
Commercial Features
- Application Class Data Sharing (AppCDS):
Application Class Data Sharing (AppCDS) extends CDS (see Class Data Sharing) to enable you to place classes from the standard extensions directories and the application class path in the shared archive. This is a commercial feature and is no longer considered experimental (contrary to what is specified in the java tool documentation). See the-XX:+UseAppCDS
option in the java launcher tool page. - Cooperative Memory Management:
Starting with JDK 8u40, the notion of “memory pressure” has been added to the JDK. Memory pressure is a property that represents the total memory usage (RAM) on the system. The higher the memory pressure, the closer the system is to running out of memory.As a reaction to increased memory pressure, the JDK will try to reduce its memory usage. This is mainly done by reducing the Java heap size. The actions the JDK will take to reduce memory usage may lead to reduced performance. This is an intentional choice.The pressure level is provided by the application through a JMX MXBean using a scale from 0 (no pressure) to 10 (almost out of memory). To enable this feature, thejdk.management.cmm.SystemResourcePressureMXBean
should be registered. The memory pressure is then set using the “MemoryPressure” attribute.A new command line flag-XX:MemoryRestriction
that takes one of the arguments ‘none’, ‘low’, ‘medium’, or ‘high’, is also available. This flag will set the initial pressure in the JDK and will work also in cases where the MXBean is not registered.Cooperative Memory Management requires the G1 GC (
-XX:+UseG1GC
). This feature is not compatible with the flag-XX:+ExplicitGCInvokesConcurrent
. - New Commercial Flags:
Two new VM options are now available for commercial license holders:- -XX:+ResourceManagement
- -XX:ResourceManagementSampleInterval=value (milliseconds)
For more information, see Java Launcher documentation.
- Java Flight Recorder(JFR) Enhancements
It is now possible to enable Java Flight Recorder at runtime. For details, see the Java Flight Recorder Runtime Guide at http://docs.oracle.com/javacomponents/jmc-5-5/jfr-runtime-guide/index.html. - New MSI Installer Documentation:
The Microsoft Windows Installer (MSI) Enterprise JRE Installer Guide is available at
https://docs.oracle.com/javacomponents/msi-jre8/install-guide. The MSI Enterprise JRE Installer requires a commercial license for use in production. To learn more about commercial features and how to enable them, visit http://www.oracle.com/technetwork/java/javaseproducts.
Bug Fixes
The following are some of the notable bug fixes included in JDK 8u40 release:
Area: core-svc
Synopsis: Default and static interface methods in JDI, JDWP and JDB
Since JDK 8 it is possible to have directly executable static and default methods in interfaces. These methods are not executable via JDWP or JDI and therefore can not be properly debugged. See JDK 8 Compatibility Guide for more details.
See 8042123.
Area: install
Synopsis: Java Access Bridge can be enabled from Control panel for 32 bit JREs.
Previously the “Enable Java Access Bridge” check box got removed from the Java Control Panel with 64 bit JRE uninstall even when 32 bit JRE was still present on the system.
Starting with JDK 8u40 release, the “Enable Java Access Bridge” checkbox is retained, at Control Panel -> Ease of Access -> Ease of Access Center -> Use the computer without a display, if a 32 bit jre is present. So, a user can enable Java Access bridge via control panel for 32 bit JREs.
See 8030124.
Area: client-libs
Synopsis: Modernizing the JavaFX Media Stack on Mac OS X
An AVFoundation based player platform is added to JavaFX media. The old QTKit based platform is now removable for Mac App Store compatibility.
See 8043697 (not public).
Area: deploy/plugin
Synopsis: Missing DOM APIs
In JDK 8u40 release, the old plugin DOM APIs were inadvertently removed. If an applet requires the use of com.sun.java.browser.dom.DOMService
to communicate with the browser, then users may need to update their applet to use netscape.javascript.JSObject
or continue using JDK 8 Update 31.
This issue has been resolved in build 26 and new 8u40 installers have been posted. If you are experiencing this problem please download and run the updated JDK 8u40 installers.
See 8074564.
Known Issues
JDK
Area: hotspot/compiler
Synopsis: Nondeterministic arithmetic when converting long strings to integers and performing OSR
For JRE 6 and above, when performing OSR on loops with huge stride and/or initial values, in a very rare case the tiered/server compilers can produce non-canonical loop shapes that can produce nondeterministic answers, when answers should be deterministic.
Workaround: Launch Java using the -XX:-UseOnStackReplacement
flag.
See 8072753.
JavaFX
Area: Control
Synopsis: Behavior and access of Control#getUserAgentStylesheet
method changed in 8u40.
In JDK 8u40, the getUserAgentStylesheet()
method moved from the Control
class to the Region
superclass.
The method was promoted from protected to public, which preserves binary compatibility, but breaks source compatibility for subclasses of Control
that override this method. The solution is to make the overridden method public in the subclass of Control
.
The semantics of the method are also changed such that any CSS that is applied from CSS files imported via the getUserAgentStylesheet()
method is only applied to the Region
in which it is a user agent stylesheet. Previously, a CSS file imported in this way could make changes throughout the application user interface, which could result in unintended style clobbering. This is no longer possible from JDK 8u40 onwards, and applications which might have been relying on this unintended behavior, may see differences in styling as a result.
See RT-38640.
Area: Control
Synopsis: PopupControl$CSSBridge
changed to extend Pane in 8u40.
In JDK 8u40, the object inheritance hierarchy of the protected javafx.scene.control.PopupControl$CSSBridge
inner class has changed in an incompatible manner. Prior to JDK 8u40, PopupControl$CSSBridge
extended from Group
and now it extends from Pane
.
This is primarily an internal class for custom PopupControls
such as Tooltip
, but it is possible that a third-party control might subclass this class. Such applications that subclass PopupControl$CSSBridge
might be affected if they were calling or overriding methods in Group
that are not in Pane
.
See RT-33696.
If you would like assistance managing and deploying Java for PCs, please contact H Tech Solutions using the URL below.