Core Java Technology Features

By the JDK Core Engineering Team, June 16, 2005

A few weeks ago, the desktop Java client group published an article detailing the important desktop Java technology features planned for the next release of the Java Platform, Standard Edition (Java SE, formerly known as J2SE).

This article will detail the important core features that are coming in Java SE 6. We list here all the items that are currently planned. Many are already integrated, and you can try them out yourself by downloading the most recent build from the snapshot release site. We try to estimate when you can expect to see in a snapshot release those items that are still in development. When a status line reads, for example, "Delivered in b39," it means that the feature was integrated in build 39. A new build is posted to the snapshot release site weekly. We increment the build number each week.

Like the desktop Java client group, we want to be as open and honest as possible. As with all large projects, some of the items we list here may not make it, but we're trying very hard. Note also that all API additions and enhancements to Java SE specification are subject to review and approval by the JSR 270 Expert Group. If the expert group decides that something listed here should not be in Java SE, then it will not be in the final version of the platform specification.

As the major feature work wraps up, we will focus our attention on fixing bugs. Because we can't fix bugs that we don't know about, now is a good time to try out the latest snapshot to make sure that all your existing applications work well. If your existing code doesn't work because of what you believe is a bug in the release, please make sure it gets into the bug database. If you find a bug -- whether new or old -- and are willing to help fix it, we want to hear from you! The collaboration site has all the details on how to get involved. We are always very happy to receive high-quality contributions.

Although language changes are not planned, two Java Specification Requests (JSRs) in development will provide expanded capabilities for language processing.

JSR 199, the Java Compiler API, will define a framework for compiling source files from within applications.

JSR 269, the Pluggable Annotation Processing API, will standardize the capabilities of the existing annotation processing tool ( apt), including a reflective API modeling the Java programming language and an API for writing annotation processors. We also plan a tree API that will complement JSR 269 by providing access to the parse trees created when Javac compiles a program.

JSR 199 and JSR 269 are currently in development, so you won't find them in the latest snapshot just yet. However, you can expect to see them in a snapshot in good time for the beta release.

Aside from the JSRs, Java SE 6 contains some miscellaneous Javac features, including support for the @SuppressWarnings annotation and the JSR 202 preverified class file format.

Another language-related JSR planned is JSR 223. This defines a framework to allow scripting language programs to access information developed in the Java platform. We currently plan to integrate this for b40. Aside from the framework, we will also include a JavaScript engine based on the Mozilla Rhino implementation. Later, we hope to include a scripting shell that is script language independent. This will be a very cool way to create a prototype, do some exploratory coding, and learn new APIs.

Core Libraries

We are not planning any major additions to the core libraries. Instead, we have focused on addressing some long-standing issues. The following are some of the notable items:

Feature: Need way to find free disk space Bug ID: 4057701Status: Delivered in b39 Description: Many developers will recognize this requirement from the JDC bug parade. Finally, java.io.File is updated with methods to determine both partition sizes and usage and the amount of free space on each partition.

Feature: java.io.File does not support long paths on Windows. Bug ID: 4403166 Status: Delivered in b19 Description: Another longtime bugaboo for many developers, the issue with paths with more than 255 characters on the Microsoft Windows operating system has finally been resolved.

Feature: Iterating over ZipFile entries is slow when using network file systems. Bug ID: 4770745Status: Delivered in b25 Description: This is a nice piece of performance work to improve class loading from rt.jar when the runtime is installed on a network file system rather than a local disk.

Feature: Concurrency utility updates Bug IDs: 6237968, 6192552, 4155650, and others Status: In development Description: The JSR 166 Expert Group, led by Doug Lea, has continued to work on a number of improvements to the concurrency utilities. Proposed additions include a version of AbstractQueueSynchronizer that uses a long for internal representation, a BlockingDeque to support blocking last-in-first-out queues, and concurrent skiplists.

Feature: Smart Card I/O API (JSR 268) Bug ID: 6239117 Status: This is still in development but should be available in good time for the beta release. Description: JSR 268 is defining an API for communication with smart cards using ISO/IEC 7816-4 application protocol data units (APDUs). It will allow Java technology applications to interact with applications running on the smart card and to store and retrieve data on the card.

In addition to the two JSRs, JDK 6 has made improvements in many areas of security. Here are a few of the more interesting items. Most have already been delivered to JDK 6, and the remainder should be in very soon.

Native platform GSS/Kerberos integration (6202035)

Support for the Simple and Protected GSS-API Negotiation Mechanism (SPNEGO) as specified by Request for Comment (RFC) 2478 (6239635)

Feature: Default CookieManager implementation Bug ID: 6244040Status: Delivered in b39 Description: Java SE 5.0 added the abstract java.net.CookieHandler class and included a concrete implementation for the plug-in. A simple default cookie handler implementation was needed for applications that use HTTP outside of the plug-in.

Feature: Internationalized domain names and resource identifiers Bug IDs: 4737170, 5085902Status: This work is still in development and should be in place by b45. Description: This supports the International Domain Name Architecture standard, as defined by RFCs 3490, 3491, 3492, 3454. Also, the Internet Engineering Task Force (IETF) is working on a specification for internationalized resource identifiers.

Feature: Programmatic access to network parameters Bug ID: 4691932Status: This work is still in development and should be in place by b43. Description: Developers of advanced network applications have a need to access the broadcast address, network mark, and other networking settings. Because many developers on the Java Developer Connection (JDC) have voted for this one, it is finally possible to get access to these settings without resorting to native code.

Enterprise Client and XML

A major theme for Java SE 6 is XML and web services. Our goal is that Java SE will provide reasonable support for the web services stack. This will primarily be client-side focused with a lightweight server to support callbacks. The main specifications are the Java Architecture for XML-Web Services (JAX-WS) 2.0 (formerly known as JAX-RPC) and Java Architecture for XML Binding (JAXB) 2.0.

JSR 224 is defining JAX-WS 2.0. This is a major update since the JAX-RPC 1.0 specification incorporating new specifications and updates to existing standards. In Java SE 6, we propose to include only the Client and Core APIs (not the Service APIs that describe the requirements on JAX-WS service implementations).

A lightweight and simple HTTP server to support basic callbacks and lightweight services ( 6270015).

Updates to the Java API for XML Processing (JAXP), including the Streaming API for XML as defined by JSR 173

Some of the JSRs are not finalized yet, and development continues. The initial integration is scheduled for b40, and our current plan is that all components be completed by September 2005.

JSR 221 is defining the Java DataBase Connectivity (JDBC) 4.0 software specification. JDBC 4.0 will be included in Java SE 6. Following are the significant additions in JDBC 4.0:

Ease-of-development features such as automatic java.sql.Driver discovery, new annotations and interfaces, and SQLException improvements

SQL:2003 XML support

National character set support

Large object (LOB) enhancements

Expect to see the components of JDBC 4.0 in b39.

Java Management Extensions (JMX)

JSR 255 is defining version 2.0 of the JMX API, and this is currently scheduled for inclusion in JDK 7.0 (code named Dolphin). For JDK 6, the JMX API is being updated through the Java Community Process (JCP) program. JDK 6 will contain version 1.3 of the JMX API, superseding version 1.2 of the JMX API and version 1.0 of the JMX Remote API that are included in Java SE 5.0. The JSR 255 Expert Group is also closely involved in the changes going into Java SE 6. Following are the three main areas of improvement:

Feature: Improve JMX Monitor API Bug IDs: 6222826, 6222961Status: Delivered in b35 Description: The JMX Monitor API allows an application to sample an attribute (property) of an MBean periodically and send a notification (event) if it passes a given threshold. This has been improved so that a thread pool is now used instead of a thread per monitor. Another improvement is the ability to monitor a value within a complex type.

Feature: Extensible metadata for MBeans ( Descriptors) Bug ID: 6204469Status: Delivered in b37 Description: In the JMX API, Model MBeans support Descriptors to supply additional metadata about the MBean. As of JDK 6, Descriptors are now available with all kinds of MBeans, not just Model MBeans. This allows arbitrary extra information to be included in the MBean's metadata (its MBeanInfo).

Feature: User-defined MXBeans Bug ID: 6175517Status: In development and planned to be available within the next few builds (b40 to b43) Description: Java SE 5.0 introduced the notion of MXBeans for java.lang.management, but it did not provide any way for applications to define their own MXBeans. This feature allows for user-defined MXBeans.

Serviceability

Because diagnosability, monitoring, and management are major themes of Java SE 6, we continue our efforts to make the platform more observable and supportable. We also continue to improve the interfaces needed by development time tools such as profilers and debuggers, as well as the interfaces used for production time instrumentation, monitoring, and management.

Following are the main items that have been developed for Java SE 6:

Feature: Runtime support for DTrace Bug ID: 5108894 Status: Delivered in b39 Description: Dynamic Tracing ( DTrace) is the comprehensive dynamic tracing facility that is built into the Solaris Operating System (OS). Administrators and developers can use it on live production systems to examine the behavior of both user programs and the operating system itself. To date, Java technology has been relatively unobservable with DTrace. An interim approach for JDK 5.0 based on the JVM Tool Interface can be found here. For Java SE 6, we have updated the Java HotSpot virtual machine (VM) with exposed probes so that DTrace can be used to observe garbage collection, class loading and unloading, threads, contended monitors, and much more. Administrators of machines running the Solaris 10 OS will love this feature!

Feature: Support java.util.concurrent locks in the lock-related facility Bug IDs: 5086470, 5086475Status: Delivered in b39 Description: This feature is to provide better monitoring and diagnostics for java.util.concurrent locks. The java.lang.management package has been updated to get java.util.concurrent locks information. In addition, the thread dump generated by Ctrl-Break or Ctrl-\ has been extended to print java.util.concurrent locks in addition to monitors.

Feature: Make jconsole more user-friendly Bug IDs: 6247572, 6245902, 6253724Status: The look and feel were updated in b35. The remaining work will be delivered before the beta release. Description: To make jconsole more user-friendly, we made changes to the system's look and feel, adding a new connection dialog box and an overview tab that shows usage graphs of multiple critical resources in a single tab.

Feature: Improve the diagnosability of java.lang.OutOfMemoryErrorBug IDs: 4753347, 6190009, 5109224, 6204527, 4965918Status: Most of the pieces were delivered for b34 and b39. Description: The java.lang.OutOfMemoryError can be difficult to diagnose. In b26, we delivered the changes for 4753347 so that the NetBeans Profiler works well with Java SE 6. This is one of the best tools for doing memory profiling and finding memory leaks. But because memory leaks in application or library code aren't the only source of the dreaded java.lang.OutOfMemoryError, we've worked on a number of incremental improvements to improve the overall diagnosability of this error. For example, you should now see a stack trace when an OutOfMemoryError is thrown when the heap is full. Next, we have updated the experimental jmap utility so that it can generate a heap dump or print information about objects pending finalization. We've also added a VM diagnostic option that will allow administrators to configure data collection scripts to run when the heap is full. Native heap exhaustion has been improved too so that when it is detected in the Java HotSpot VM, a fatal error log will be generated. Finally, the garbage collection team has updated the VM so that a long-lived Java Native Interface (JNI) critical section doesn't cause other threads to throw an OutOfMemoryError because garbage collection is blocked.

Feature: VM Attach Mechanism Bug IDs: 6173575, 6173571, 6173612, 6275571Status: Everything was delivered in b37 except for the jconsole changes, which we will integrate with other jconsole updates before the beta release. Description: The -agentlib, -agentpath, and -javaagent options in Java SE 5.0 allow an agent to be specified at VM startup. In Java SE 6, we want to allow tools to attach to applications that were started without any special command-line options and start agents in the running application. This will allow tools to monitor and diagnose issues with running applications. For example, we are updating jconsole so that it shows all the Java applications that the user is running. When the user clicks on the application, then jconsole will attach, start the JMX agent, and then the user can monitor and manage it.

Feature: jstack should be like a remote Ctrl-Break. Bug ID: 6260070Status: Delivered in b37 Description: The jstack utility was added in JDK 5.0 to allow a developer to obtain a thread dump of a hung process or crash dump. In Java SE 6, we have extended jstack so that it can be used to get thread dumps of running applications too. This should be very useful when monitoring applications that run in the background. Unlike in JDK 5.0, the utility will ship on Microsoft Windows, as well as on the Solaris and Linux operating systems.

Feature: Improvements to the JVM Tool Interface Bug IDs: 4146774, 6216027, 6263317Status: Most of this work is in b37 and b39. Description: The JSR 163 Expert Group has continued to work on a number of improvements to the JVM Tool Interface that was added in JDK 5.0. Support has been added to allow multiple agents doing bytecode instrumentation (BCI) to coexist. Also, calls to native methods can now be instrumented. Other incremental improvements allow agents to get access to the class constant pool and get the location where a monitor is acquired. Other functions allow a debugger to skip the execution of the remainder of a method.

Feature: Improvements to the Java Platform Debug Architecture (JPDA) Bug IDs: 5024119, 5089849, 4401399, 6230699, 4195445, 5024104, 4836939, 4490824, 6175634Status: Most of the improvements were delivered into b37 and b39. Description: The JPDA has been updated to allow IDEs and other tools to do some limited memory analysis and leak detection while in the debugger. We've also added support so that debuggers and other tools can detect deadlocks and find the stack traces where monitors are locked. Among the many other incremental improvements are the following:

Breakpoint support for non-Java program language debugging has been improved.

Debuggers can now force the early return of a method.

The debugger can access arguments in classes that were not compiled with the -g option.