`

jdk 1.6新特性

 
阅读更多

http://www.oracle.com/technetwork/java/javase/features-141434.html原文章:

JavaSE 6技术变化集锦


JDK Documentation
Java Platform, Standard Edition 6 is a major feature release. The following list highlights many of the significant features and enhancements in Java SE 6 since the prior major release, J2SE 5.0. It is followed by a detailed table with links to related bugs, enhancements, and JSRs.

Note, this web page relates to the Release Candidate milestone for Java SE 6. Its related Umbrella JSR 270 does not itself define specific features. Instead it enumerates features defined in other JSRs or through the concurrent maintenance review of the Java SE platform specification. The final release is expected to include all JSR 270 features, although it is possible for an approved feature to be dropped.

Refer also to:
Java Platform, Standard Edition Differences between 5.0 fcs and 6 Beta .


Highlights of Technology Changes in Java SE 6

1.集合框架(Collections Framework)

2.部署Deployment (Java Web Start and Java Plug-in)

3.拖拽(Drag and Drop)

4.仪表(Instrumentation

5.国际化支持(Internationalization Support)

6.I/O支持

7.JAR (Java Archive Files) - An annotated list of changes between the 5.0 and 6.0 releases to APIs, the jar command, and the jar/zip implementation

8.Java Web Start

9.Java DB 10.2 JDBC4 Early Access

The $JAVA_HOME/db subdirectory contains class libraries for Java DB, Sun Microsystems's distribution of the Apache Derby database technology.

  • For a description of the capabilities of this version of Java DB, see the release notes in the $JAVA_HOME/db subdirectory.
  • This Early Access version of Java DB is built from Apache Derby 10.2.1.7 source code (revision 453926) using JDK 6 JDBC 4 APIs to build JDBC 4 driver code.
免责声明:这是早期访问软件是没有担保或支持。它提供了“是”。它不是生产使用
DISCLAIMER: THIS IS EARLY ACCESS SOFTWARE AND COMES WITH NO WARRANTIES OR SUPPORT. IT IS PROVIDED "AS IS". IT IS NOT FOR PRODUCTION USE.
10.JMX (Java Management Extensions) - A list of JMX API changes between the J2SE 5.0 and Java SE 6 releases.
11.JPDAJava平台调试架构Java Platform Debugger Architecture
    12.JVM TI (Java Virtual Machine Tool Interface)
    13.lang and util 包(packages)
    14.Java平台的监控和管理Monitoring and Management for the Java Platform
    15.Java SE 6正式支持JConsole(JConsole is Officially Supported in Java SE 6)
    16.网络特性Networking Features
    17.性能Performance
    18.反射Reflection
    19.RMI (Remote Method Invocation)
    20.Scripting
    21.Security
    22.对象序列化Serialization of Objects
    23.swing
    24.VM (Java Virtual Machine)

    以下条目由区/组件排序。第一列表示变化范围
    Items are ordered by area/component. The first column indicates the scope of a change:

    jsr – A larger feature or feature set having its own Java Specification Request
    api – A smaller feature that adds new Java APIs (application programming interfaces)
    imp – An implementation enhancement that does not involve new APIs, for example, a performance improvement

    SCOPE AREA/
    COMPONENT SYNOPSIS RFE
    api client/2d ImageIO: GIF writer 4339415
    imp client/2d Native Text Rendering Parity 4726365
    imp client/2d Improved hardware acceleration on Windows 5104393
    imp client/2d Single-threaded rendering for OpenGL pipelines 6219284
    api client/awt Pop-up splash screen at beginning of Java startup 4247839
    api client/awt Java applications can access desktop applications 6255196
    api client/awt Improved modal dialogs 4080029
    imp client/awt XAWT is the default Toolkit on Solaris 5049146
    api client/awt Windows system-tray support 4310333
    imp client/awt Better support for input in non-English locales 4360364
    imp client/awt Live resizing 6199167
    imp client/deploy Improved application deployment across browsers 6329487
    api client/deploy Allow JAR files to be shared across installed JREs 6271065
    imp client/deploy Improved user experience in JRE/JDK installer 5079209
    imp client/deploy Improved security 6222485
    imp client/deploy Direct execution of JAR files on Linux 6211008
    imp client/deploy Improved desktop integration in Java Web Start 4625362
    imp client/deploy Improved IFTW installer 6198632
    imp client/deploy Improved startup & footprint for plugin/webstart 6329480
    imp client/deploy Mozilla Firefox browser support 6216340
    imp client/deploy Default Java on Linux 6211006
    imp client/deploy Improved user experience in Java Plug-in and Java Web Start 6205064
    imp client/deploy Unified download engine 4802551
    imp client/deploy Support Mozilla and Firefox family browsers. 6216340
    api client/dnd A way to avoid hangs on retrieval of clipboard data 4818143
    imp client/i18n Support for important locales 4324505
    imp client/i18n Japanese calendar 4609228
    api client/i18n Resource bundle enhancements 5102289
    api client/i18n Normalizer API 4221795
    api client/i18n Pluggable locales: Pluggability for break iterators 4052440
    api client/i18n Pluggable locales: Pluggability for locale names, formatters, and collators 4052440
    imp client/l10n Chinese localization for JDK tools 6209342
    imp client/swing GTK Native L&F Fidelity 6185456
    imp client/swing Through-the-stack: Reduced footprint / startup time 6329480
    imp client/swing Native look & feel fidelity
    imp client/swing Avalon Look-and-Feel 6329475
    api client/swing JTable sorting, filtering, and highlighting 4747079
    api client/swing JTabbedPane: Tabs as Components 4499556
    imp client/swing Windows native L&F fidelity 5106661
    api client/swing SwingWorker 4681682
    api client/swing Improve Drag & Drop features for Swing Components 4468566
    api client/swing Extend SpringLayout 4726194
    api client/swing Text Document Printing 4791649
    imp client/swing Improved Painting Performance (fix grey boxes) 4967886
    jsr core/core JSR 223: Scripting for the Java Platform 6249843
    api core/debug Multiple Simultaneous Agents 4772582
    api core/debug Added Heap Capabilities to JPDA 4914266
    api core/debug Attach-on-demand 6173612
    api core/debug JVMPI and JVMDI have been removed. 4914266
    api core/jndi Read-timeout specification for LDAP operations 6176036
    api core/libs Array Reallocation API 4655503
    imp core/libs BigDecimal optimizations for specjbb++
    api core/libs Floating point: Add IEEE 754 recommended functions to java.lang.{{,Strict}Math} 4406429
    api core/libs Standard service-provider API (java.util.Service) 4640520
    api core/libs Collections and Concurrency Updates 6268386
    api core/libs IO Enhancement: Password Prompting 4050435
    api core/libs IO Enhancement: File Attributes 6216563
    api core/libs IO Enhancement: Method for Discovering Free Disk Space 4057701
    imp core/libs IO Enhancement: Long pathnames on Windows 4403166
    api core/libs Low-level Java compiler API for IDEs 4813736
    jsr core/libs JSR 202: Java Class File Specification Update 4639391
    jsr core/libs JSR 199: Java compiler API 4164450
    imp core/libs Improved perceived footprint 6280693
    api core/libs Deques 6192552
    api core/libs Navigable Maps and Sets 4155650
    imp core/libs BitSet Updates 4963875,4979017,4979028,4979031,5030267,6222207,6404711
    imp core/libs Performance Improvements when compiling using network file systems 4770745
    imp core/m&m Improved diagnosability of OutOfMemoryError 6173515
    api core/m&m Generic annotations for MBean descriptor contents 6221321
    api core/m&m Support for java.util.concurrent locks in the lock related facility 5086470
    imp core/m&m jconsole is more user-friendly 6174397
    api core/m&m Small-scale improvements to JMX Monitor API 6222961
    api core/m&m descriptors added to all types of MBean 6204469
    api core/m&m MXBeans added to JMX 6175517
    api core/net Light-weight HTTP server 6270015
    api core/net Internationalized resource identifiers 5085902
    api core/net Default CookieManager implementation 6244040
    imp core/net SPNEGO HTTP authentication 6260531
    api core/net International domain names 4737170
    api core/net Programmatic access to network parameters 4691932
    imp core/sec Native platform GSS integration 6202035,6345202
    imp core/sec SPNEGO in Java GSS 6239635
    imp core/sec MS CAPI Keystore provider 6318171
    imp core/sec Better support for NSS keystore 6273877
    imp core/sec Improved Policy performance 5037004
    imp core/sec JSR 268: Java Smart Card I/O API 6239117
    jsr core/sec JSR 105: XML DSig 4635230
    api core/sec Enhance certificate APIs 4635060
    jsr core/tools JSR 269: Standard pluggabilty API for annotation processors (APT) 6222574
    imp core/tools javac: Support for split verification 6227862,6227862,5110170,5110184,6217263
    imp core/tools javac: ImplementJSR 175'sjava.lang.SuppressWarnings 4986256
    imp core/tools Class-path wildcards 6268383
    jsr ee/ee JSR 250: Common annotations 6304697
    imp ee/jdbc Extended JDBC-ODBC bridge to enable JDBC 4.0 EoD features 6290312
    jsr ee/jdbc JSR 221: JDBC 4.0 6290312
    imp ee/xml JAXP 1.4
    JSR 206: Java API for XML Processing
    6317994
    jsr ee/xml Support for the Web Services stack
    JSR 222: JAXB 2.0
    JSR 224: JAX-RPC 2.0
    JSR 173: STAX
    JSR 181: Web Services Metadata
    6245626
    api ee/xml JavaBeans Activation Framework (JAF) 6254474
    imp vm/compilers Improved performance of compiled code 5079711,6206844,6239807,4850474,
    5003419,5004907,5101346,6190413,6191063,
    6196383,6196722,6211497,6232485,6233627,6245809,
    6251002,6262235,
    imp vm/c1 Linear scan register allocator for C1 6320351
    imp vm/c2 Improved loop optimization 5073662,5074608,5091921,6260293
    imp vm/c2 Escape analysis 6339956
    imp vm/c2 Lock coarsening 6245809
    imp vm/gc CMS: Parallelize concurrent marking
    imp vm/gc Parallel compaction
    imp vm/runtime Improve uncontended synchronization performance
    imp vm/runtime Improved performance of contended synchronization operations
    imp vm/runtime Faster format checker/class-file parser
    imp vm/runtime Improved startup time 6179212
    imp vm/runtime Improved runtime performance
    imp vm/runtime Improved JNI performance 5086424
    imp vm/runtime Class circularity detection 4699981
    imp vm/runtime DTrace support in the VM

    一、Collections Framework Enhancements

    概述Java SE 6中对集合框架的增强(This page summarizes enhancements to the collections framework in Java SE 6.

    这个版本比5 API看到变化较少,但更多的是对规范的准确和清晰的焦点。我们建议您使用JavaSE6规范,即使编写程序的版本
    This release saw fewer API changes than 5.0, but there was more of a focus on the accuracy and clarity of the specification. We recommend using the Java SE 6 specification even when writing programs for older releases.
    API变化的主要主题是更好的双向集合访问
    The primary theme of the API changes wasbetter bi-directional collection access.
    These new collection interfaces are provided:
    • Deque- adouble ended queue, supporting element insertion and removal at both ends. Extends theQueueinterface.双端队列,支持元素两端插入和去除。继承Queue接口
    • BlockingDeque- aDequewith operations that wait for the deque to become non-empty when retrieving an element, and wait for space to become available in the deque when storing an element. Extends both theDequeandBlockingQueueinterfaces. (This interface is part ofjava.util.concurrent.)
    • NavigableSet- aSortedSetextended with navigation methods reporting closest matches for given search targets. ANavigableSetmay be accessed and traversed in either ascending or descending order. This interface is intended to supersede theSortedSetinterface.
    • NavigableMap- aSortedMapextended with navigation methods returning the closest matches for given search targets. ANavigableMapmay be accessed and traversed in either ascending or descending key order. This interface is intended to supersede theSortedMapinterface.
    • ConcurrentNavigableMap- aConcurrentMapthat is also aNavigableMap. (This interface is part ofjava.util.concurrent.)

    The following concrete implementation classes have been added:

    These existing classes have been retrofitted to implement new interfaces:

    • LinkedList- retrofitted to implement theDequeinterface.
    • TreeSet- retrofitted to implement theNavigableSetinterface.
    • TreeMap- retrofitted to implement theNavigableMapinterface.

    Two new methods were added to theCollectionsutility class:

    • newSetFromMap(Map)- creates a general purposeSetimplementation from a general purposeMapimplementation.

      There is noIdentityHashSetclass, but instead, just use

      Set<Object> identityHashSet=
          Collections.newSetFromMap(
              new IdentityHashMap<Object, Boolean>());
      
    • asLifoQueue(Deque)- returns a view of aDequeas a Last-in-first-out (Lifo)Queue.
    TheArraysutility class now has methodscopyOfandcopyOfRangethat can efficiently resize, truncate, or copy subarrays for arrays of all types.

    Before:

    int[] newArray = new int[newLength];
    System.arraycopy(oldArray, 0, newArray, 0, oldArray.length);
    

    After:

    int[] newArray = Arrays.copyOf(a, newLength);

    待续

    分享到:
    评论

    相关推荐

    Global site tag (gtag.js) - Google Analytics