Documentation Contents

# Tools Enhancements in JDK 8

JavaFX on JDK 8 has a shorter support timeline than JDK 8. Update releases of JDK 8 after March 2028 will not include JavaFX or the `javapackager` tool. Please visit https://www.oracle.com/javase/javafx for more information.

Note: Some of the following features require a commercial license for use in production. To learn more about commercial features and how to enable them please visit Oracle Java SE Advanced & Suite Products.

The following enhancements were introduced in JDK 8u40:

- `java` tool:

  - The `-XX:+CheckEndorsedAndExtDirs` has been added because the endorsed-standards override mechanism (JDK-8065675) and the extension mechanism (JDK-8065702) have been deprecated. The option helps identify any existing uses of these mechanisms and is supported in JDK 7u80 and JDK 8u40. See JDK-8064667.

  - Prior to JDK 8u40, if you want to use Java Flight Recorder (JFR) and create a flight recording for a particular Java application, you must specify both the `-XX:+UnlockCommercialFeatures` and `-XX:+FlightRecorder` when launching the application. In JDK 8u40, you do not have to specify these options at the command line. JFR offers a variety of ways to unlock commercial features and enable JFR during the runtime of an application. These include `java` command line options, `jcmd` diagnostic commands, and Graphical User Interface (GUI) controls within Java Mission Control. This flexibility enables you to provide the appropriate options at startup, or interact with JFR later, after the JVM is already running. See the Java Flight Recorder Runtime Guide at the Java Components page.

  - The option `-XX:StartFlightRecording=parameter=value` has a new parameter, `dumponexit={true|false}`, which specifies whether a dump file of JFR data should be generated when the JVM terminates in a controlled manner.

  - The options related to Restricted Transactional Memory (RTM) are no longer experimental. These options include `-XX:RTMAbortRatio=abort_ratio`, `-XX:RTMRetryCount=number_of_retries`, `-XX:+UseRTMDeopt`, and `-XX:+UseRTMLocking`. See JDK-8054376.

  - Application Class Data Sharing (AppCDS) has been introduced in this update release. AppCDS extends CDS (see Class Data Sharing) to enable classes from the standard extensions directories and the application class path to be placed 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 option `-XX:+UseAppCDS` and JDK-8054376.

  - The options `-XX:+ResourceManagement` and `-XX:ResourceManagementSampleInterval=value` have been added. Resource Management is a commercial feature.

  - Additional information about large pages has been added. Large Pages, also known as huge pages, are memory pages that are significantly larger than the standard memory page size. Large pages optimize processor Translation-Lookaside Buffers. The Linux options `-XX:+UseHugeTLBFS`, `-XX:+UseSHM`, and `-XX:+UseTransparentHugePages` have been documented. See JDK-8040180.

  - The option `-XX:ObjectAlignmentInBytes=alignment` has been documented. See JDK-8040176.

- `jjs` tool:

  - The option `--optimistic-types=[true|false]` has been added. It enables or disables optimistic type assumptions with deoptimizing recompilation. See JDK-8042946.

  - The option `--language=[es5]` has been added to the `jjs` tool. It specifies the ECMAScript language version. See JDK-8046038.

- `javapackager` tool:

  - New arguments are available for OS X bundlers. The `mac.CFBundleVersion` argument identifies the internal version number to be used. The `mac.dmg.simple` argument indicates if DMG customization steps that depend on executing AppleScript code are skipped. See JDK-8043060.

- `jcmd` tool:

  - You can use the `jcmd` tool to dynamically interact with Java Flight Recorder (JFR) in a JVM that is already running. You can use it to unlock commercial features, enable/start/stop flight recordings, and obtain various status messages from the system. For a list of examples, see the Java Flight Recorder Runtime Guide at the Java Components page.

- `jstat` tool:

  - The `jstat` tool has been updated with information about compressed class space (a special part of metaspace). See JDK-8040079.

The following enhancements were introduced in JDK 8u20:

- The `javafxpackager` tool has been renamed to `javapackager`. This tool has been enhanced with new arguments for self-contained application bundlers. See JDK-8041516.

- Enhancements related to the `java` launcher tool:

  - Experimental JIT compiler options related to Restricted Transactional Memory (RTM) have been added. See JDK-8031320.

  - Options related to string deduplication have been added. See JDK-8029075.

  - Options related to Advanced Encryption Standard (AES) intrinsics have been added. See JDK-8034899.

  - Rarely used combinations of garbage collection options have been deprecated. See JDK-8026909.

The following enhancements were introduced in JDK 8:

- The `jjs` command was introduced, which invokes the Nashorn engine either in interactive shell mode, or to interpret script files. For more information, see the Nashorn User's Guide.

- The `java` command is capable of launching JavaFX applications, provided that the JavaFX application is packaged correctly. See How Classes are Found.

- The `java` command man page (both nroff and HTML) has been completely reworked. The advanced options are now divided into Runtime, Compiler, Garbage Collection, and Serviceability, according to the area that they affect. Several previously missing options are now described. There is also a section for options that were deprecated or removed since the previous release.

- The new `jdeps` command-line tool allows the developer to analyze class files to determine package-level or class-level dependencies. See JDK-8003562.

- JDK 8 provides remote access to diagnostic commands which were previously accessible only locally via the `jcmd` tool. Remote access is provided using the Java Management Extensions (JMX), so diagnostic commands are exposed to a platform MBean registered to the platform MBean server. The MBean is the `com.sun.management.DiagnosticCommandMBean` interface. See the `jcmd` documentation for Solaris, Linux, and OS X or Windows.

- The `jarsigner` tool contains a new option `-tsapolicyid` which enables you to request a signed time stamp from a Time Stamping Authority and attach it to a signed JAR file. See JDK-8009636

- You can obtain the names of the formal parameters of any method or constructor with the method `java.lang.reflect.Executable.getParameters`. However, `.class` files do not store formal parameter names by default. To store formal parameter names in a particular `.class` file, and thus enable the Reflection API to retrieve formal parameter names, compile the source file with the `-parameters` option of the `javac` compiler. See JDK-8004727.

- The type rules for binary comparisons in the Java Language Specification (JLS) Section 15.21 will now be correctly enforced by `javac`. Since JDK5, `javac` has accepted some programs with Object-primitive comparisons that are incorrectly typed according to JLS 15.21. These comparisons will now be correctly identified as type errors. See JDK-8013357.

- The `apt` tool and its associated API contained in the package `com.sun.mirror` have been removed in this release. Use the options available in the `javac` tool and the APIs contained in the packages `javax.annotation.processing` and `javax.lang.model` to process annotations. See JDK-7041249

For enhancements pertaining to the `javadoc` tool, see the What's New page for Javadoc.

Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved.
Contact Us