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

SCOPEAREA/
COMPONENT
SYNOPSISRFE
apiclient/2dImageIO: GIF writer4339415
impclient/2dNative Text Rendering Parity4726365
impclient/2dImproved hardware acceleration on Windows5104393
impclient/2dSingle-threaded rendering for OpenGL pipelines6219284
apiclient/awtPop-up splash screen at beginning of Java startup4247839
apiclient/awtJava applications can access desktop applications6255196
apiclient/awtImproved modal dialogs4080029
impclient/awtXAWT is the default Toolkit on Solaris5049146
apiclient/awtWindows system-tray support4310333
impclient/awtBetter support for input in non-English locales4360364
impclient/awtLive resizing6199167
impclient/deployImproved application deployment across browsers6329487
apiclient/deployAllow JAR files to be shared across installed JREs6271065
impclient/deployImproved user experience in JRE/JDK installer5079209
impclient/deployImproved security6222485
impclient/deployDirect execution of JAR files on Linux6211008
impclient/deployImproved desktop integration in Java Web Start4625362
impclient/deployImproved IFTW installer6198632
impclient/deployImproved startup & footprint for plugin/webstart6329480
impclient/deployMozilla Firefox browser support6216340
impclient/deployDefault Java on Linux6211006
impclient/deployImproved user experience in Java Plug-in and Java Web Start6205064
impclient/deployUnified download engine4802551
impclient/deploySupport Mozilla and Firefox family browsers.6216340
apiclient/dndA way to avoid hangs on retrieval of clipboard data4818143
impclient/i18nSupport for important locales4324505
impclient/i18nJapanese calendar4609228
apiclient/i18nResource bundle enhancements5102289
apiclient/i18nNormalizer API4221795
apiclient/i18nPluggable locales: Pluggability for break iterators4052440
apiclient/i18nPluggable locales: Pluggability for locale names, formatters, and collators4052440
impclient/l10nChinese localization for JDK tools6209342
impclient/swingGTK Native L&F Fidelity6185456
impclient/swingThrough-the-stack: Reduced footprint / startup time6329480
impclient/swingNative look & feel fidelity
impclient/swingAvalon Look-and-Feel6329475
apiclient/swingJTable sorting, filtering, and highlighting4747079
apiclient/swingJTabbedPane: Tabs as Components4499556
impclient/swingWindows native L&F fidelity5106661
apiclient/swingSwingWorker4681682
apiclient/swingImprove Drag & Drop features for Swing Components4468566
apiclient/swingExtend SpringLayout4726194
apiclient/swingText Document Printing4791649
impclient/swingImproved Painting Performance (fix grey boxes)4967886
jsrcore/core JSR 223: Scripting for the Java Platform6249843
apicore/debugMultiple Simultaneous Agents4772582
apicore/debugAdded Heap Capabilities to JPDA4914266
apicore/debugAttach-on-demand6173612
apicore/debugJVMPI and JVMDI have been removed.4914266
apicore/jndiRead-timeout specification for LDAP operations6176036
apicore/libsArray Reallocation API4655503
impcore/libsBigDecimal optimizations for specjbb++
apicore/libsFloating point: Add IEEE 754 recommended functions to java.lang.{{,Strict}Math}4406429
apicore/libsStandard service-provider API (java.util.Service)4640520
apicore/libsCollections and Concurrency Updates6268386
apicore/libsIO Enhancement: Password Prompting4050435
apicore/libsIO Enhancement: File Attributes6216563
apicore/libsIO Enhancement: Method for Discovering Free Disk Space4057701
impcore/libsIO Enhancement: Long pathnames on Windows4403166
apicore/libsLow-level Java compiler API for IDEs4813736
jsrcore/libs JSR 202: Java Class File Specification Update4639391
jsrcore/libs JSR 199: Java compiler API4164450
impcore/libsImproved perceived footprint6280693
apicore/libsDeques6192552
apicore/libsNavigable Maps and Sets4155650
impcore/libsBitSet Updates 4963875,4979017,4979028,4979031,5030267,6222207,6404711
impcore/libsPerformance Improvements when compiling using network file systems4770745
impcore/m&mImproved diagnosability of OutOfMemoryError6173515
apicore/m&mGeneric annotations for MBean descriptor contents6221321
apicore/m&mSupport for java.util.concurrent locks in the lock related facility5086470
impcore/m&mjconsole is more user-friendly6174397
apicore/m&mSmall-scale improvements to JMX Monitor API6222961
apicore/m&mdescriptors added to all types of MBean6204469
apicore/m&mMXBeans added to JMX6175517
apicore/netLight-weight HTTP server6270015
apicore/netInternationalized resource identifiers5085902
apicore/netDefault CookieManager implementation6244040
impcore/netSPNEGO HTTP authentication6260531
apicore/netInternational domain names4737170
apicore/netProgrammatic access to network parameters4691932
impcore/secNative platform GSS integration 6202035,6345202
impcore/secSPNEGO in Java GSS6239635
impcore/secMS CAPI Keystore provider6318171
impcore/secBetter support for NSS keystore6273877
impcore/secImproved Policy performance5037004
impcore/sec JSR 268: Java Smart Card I/O API6239117
jsrcore/sec JSR 105: XML DSig4635230
apicore/secEnhance certificate APIs4635060
jsrcore/tools JSR 269: Standard pluggabilty API for annotation processors (APT)6222574
impcore/toolsjavac: Support for split verification 6227862,6227862,5110170,5110184,6217263
impcore/toolsjavac: ImplementJSR 175'sjava.lang.SuppressWarnings4986256
impcore/toolsClass-path wildcards6268383
jsree/ee JSR 250: Common annotations6304697
impee/jdbcExtended JDBC-ODBC bridge to enable JDBC 4.0 EoD features6290312
jsree/jdbc JSR 221: JDBC 4.06290312
impee/xmlJAXP 1.4
JSR 206: Java API for XML Processing
6317994
jsree/xmlSupport 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
apiee/xmlJavaBeans Activation Framework (JAF)6254474
impvm/compilersImproved performance of compiled code 5079711,6206844,6239807,4850474,
5003419,5004907,5101346,6190413,6191063,
6196383,6196722,6211497,6232485,6233627,6245809,
6251002,6262235,
impvm/c1Linear scan register allocator for C16320351
impvm/c2Improved loop optimization 5073662,5074608,5091921,6260293
impvm/c2Escape analysis6339956
impvm/c2Lock coarsening6245809
impvm/gcCMS: Parallelize concurrent marking
impvm/gcParallel compaction
impvm/runtimeImprove uncontended synchronization performance
impvm/runtimeImproved performance of contended synchronization operations
impvm/runtimeFaster format checker/class-file parser
impvm/runtimeImproved startup time6179212
impvm/runtimeImproved runtime performance
impvm/runtimeImproved JNI performance5086424
impvm/runtimeClass circularity detection4699981
impvm/runtimeDTrace support in the VM

一、Collections Framework Enhancements

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

这个版本比5 API看到变化较少,但更多的是对规范的准确和清晰的焦点。 我们建议您使用 Java SE 6规范, 即使 编写程序的 版本
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.
The Arrays utility class now has methods copyOf and copyOfRange that 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);

待续

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值