What's New in Documentation
Documentation is regularly updated to provide developers with in-depth information about new features in the Java platform. Some recent updates include:
- The
JLayer
class has been added, which is a flexible and powerful decorator for Swing components; see How to Decorate Components with JLayer. - The Nimbus Look and Feel has been moved from the
com.sun.java.swing
package to thejavax.swing
package; see thejavax.swing.plaf.nimbus
package. - Mixing Heavyweight and Lightweight Components is easier to accomplish.
- Windows with transparency and non-rectangular shape are supported; see How to Create Translucent and Shaped Windows
- An HSV tab has been added to the
JColorChooser
class.
- The
java.nio.file
package and its related package,java.nio.file.attribute
, provide comprehensive support for file I/O and for accessing the file system; see File I/O (featuring NIO.2). NIO stands for non-blocking I/O.- The directory
<Java home>/sample/nio/chatserver/
contains samples that demonstrate the new APIs contained in thejava.nio.file
package. - The directory
<Java home>/demo/nio/zipfs/
contains samples that demonstrate the NIO.2 NFS (Network File System) file system.
- The directory
- The
URLClassLoader.close
method has been added; see Closing a URLClassLoader. - The Sockets Direct Protocol (SDP) provides access to high performance network connections; see Understanding the Sockets Direct Protocol.
- A new native provider has been added that provides several ECC-based algorithms (ECDSA/ECDH); see Sun PKCS#11 Provider's Supported Algorithms in Java PKCS#11 Reference Guide.
- Weak cryptographic algorithms can now be disabled; see Appendix D: Disabling Cryptographic Algorithms in Java PKI Programmer's Guide and Disabled Cryptographic Algorithms in Java Secure Socket Extension (JSSE) Reference Guide.
- Various enhancements related to SSL/TLS have been added to Java Secure Socket Extension.
- The
TransferQueue
interface has been added, which is a refinement of theBlockingQueue
interface. The classLinkedTransferQueue
implements theTransferQueue
interface.
- The fork/join framework, which is based on the
ForkJoinPool
class, is an implementation of theExecutor
interface. It is designed to efficiently run a large number of tasks using a pool of worker threads. A work-stealing technique is used to keep all the worker threads busy, to take full advantage of multiple processors. See Fork/Join in The Java Tutorials.- The directory
<Java home>/sample/forkjoin/
contains samples that demonstrate the fork/join framework.
- The directory
- The
ThreadLocalRandom
class eliminates contention among threads using pseudo-random numbers; see Concurrent Random Numbers. - The
Phaser
class is a new synchronization barrier, similar toCyclicBarrier
.
Rich Internet Applications (RIA) and Deployment
- The window of a dragged applet can be decorated with a default or custom title; see Requesting and Customizing Applet Decoration in Draggable Applets.
- The following enhancements have been made to the syntax of JNLP files; see JNLP File Syntax:
- The
os
attribute in theinformation
andresources
elements can now contain specific versions of Windows, such as Windows Vista or Windows 7. - Applications can use the
install
attribute in theshortcut
element to specify their desire to be installed. Installed applications are not removed when the Java Web Start cache is cleared, but can be explicitly removed using the Java Control Panel. - Java Web Start applications can be deployed without specifying the
codebase
attribute; see Deploying Without Codebase
- The
- A JNLP file can be embedded into an HTML page; see Embedding JNLP File in Applet Tag.
- You can check the status variable of the applet while it is loading to determine if the applet is ready to handle requests from JavaScript code; see Handling Initialization Status With Event Handlers.
- You now have control of the window decoration style and title of an applet launched from a shortcut or dragged out of the browser; see Requesting and Customizing Applet Decoration in Developing Draggable Applets.
- A new XRender-based Java 2D rendering pipeline is supported for modern X11-based desktops, offering improved graphics performance; see the
xrender
flag in System Properties for Java 2D Technology. - The JDK now enumerates and displays installed OpenType/CFF fonts through methods such as
GraphicsEnvironment.getAvailableFontFamilyNames
; these fonts are also recognized by theFont.createFont
method. See Selecting a Font. - The
TextLayout
class supports Tibetan script. libfontconfig
, a font configuration API, is used to select fonts to use for the logical fonts for some implementations of Linux; see Fontconfig.
- This release contains Java API for XML Processing (JAXP) 1.4.5, supports Java Architecture for XML Binding (JAXB) 2.2.3, and supports Java API for XML Web Services (JAX-WS) 2.2.4.
- Unicode 6.0.0 is supported; see Unicode in The Java Tutorials.
- The directory
<Java home>/demo/jfc/Font2DTest/
contains samples that demonstrate Java support for Unicode 6.0.
- The directory
- Java SE 7 can accommodate new currencies that are identified by their ISO 4217 codes; see the
Currency
class.
- Potential deadlocks were eliminated for multithreaded, non-hierarchically delegating custom class loaders; see Multithreaded Custom Class Loaders in Java SE 7.
- The following enhancements have been added to the Java language:
- Binary Literals
- Underscores in Numeric Literals
- Strings in switch Statements
- Type Inference for Generic Instance Creation
- Improved Compiler Warnings and Errors When Using Non-Reifiable Formal Parameters with Varargs Methods
- The try-with-resources Statement
- Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking
- Java Virtual Machine Support for Non-Java Languages: Java SE 7 introduces a new JVM instruction that simplifies the implementation of dynamically typed programming languages on the JVM.
- Garbage-First Collector is a server-style garbage collector that replaces the Concurrent Mark-Sweep Collector (CMS).
- Java HotSpot Virtual Machine Performance Enhancements
- JDBC 4.1 introduces the following features:
- The ability to use a
try
-with-resources statement to automatically close resources of typeConnection
,ResultSet
, andStatement
; see Closing Connections in Processing SQL Statements. - RowSet 1.1: The introduction of the
RowSetFactory
interface and theRowSetProvider
class, which enable you to create all types of row sets supported by your JDBC driver; see Using the RowSetFactory Interface in Using JdbcRowSet Objects.
- The ability to use a