JAVA 7 新特性
Java 7 正式版已经发布,来看看新特性。(转载自OSChina)
Java 7 的架构图:

新特性一览表:
Swing
JLayer?类,是一个灵活而且功能强大的Swing组件修饰器,使用方法:How to Decorate Components with JLayer.com.sun.java.swing?包移到?javax.swing?包中,详情:javax.swing.plaf.nimbusJColorChooser?类新增 HSV tab.网络
新增?URLClassLoader.close?方法,请看?Closing a URLClassLoader.集合
新增?TransferQueue?接口,是?BlockingQueue?的改进版,实现类为?LinkedTransferQueueRIA/发布
os?attribute in the?information?and?resources?elements can now contain specific versions of Windows, such as Windows Vista or Windows 7.install?attribute in the?shortcut?element to specify their 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.codebaseattribute; see?Deploying Without CodebaseXML
java.lang 包
Java 虚拟机
Java I/O
java.nio.file?包以及相关的包?java.nio.file.attribute?提供对文件 I/O 以及访问文件系统的全面支持,请看?File I/O (featuring NIO.2).
<Java home>/sample/nio/chatserver/?包含使用 java.nio.file 包的演示程序<Java home>/demo/nio/zipfs/?包含 NIO.2 NFS 文件系统的演示程序安全性
并发
ForkJoinPool?类,是?Executor?接口的实现,设计它用来进行高效的运行大量任务;使用 work-stealing 技术用来保证大量的 worker 线程工作,特别适合多处理器环境,详情请看?Fork/Join?<Java home>/sample/forkjoin/?包含了 fork/join 框架的演示程序ThreadLocalRandom?类class 消除了使用伪随机码线程的竞争,请看?Concurrent Random Numbers.Phaser?类是一个新的同步的屏障,与?CyclicBarrier?类似.Java 2D
xrender?.GraphicsEnvironment.getAvailableFontFamilyNames?方法 See?Selecting a Font.TextLayout?类支持西藏语脚本libfontconfig, 是一个字体配置 api ,see?Fontconfig.国际化
<Java home>/demo/jfc/Font2DTest/?包含 Unicode 6.0 的演示程序Currency?类.Java 编程语言特性
JDBC 4.1
try-with-resources?语句进行自动的资源释放,包括连接、语句和结果集