Java7新特性

 JDK7 Download:http://www.oracle.com/technetwork/java/javase/downloads/index.html

JDK7 API:http://download.oracle.com/javase/7/docs/api/

Java 1.4到1.5的修改很大,在编译compile-time 方面提升很大,Java 6在运行时runtime智能上做了优化,Java 7的主要改进:模块化。我们分析一下Java 7新功能的主要修改:

◆Modularization 模块化– JSR 294 或者 Project Jigsaw

◆JVM 对动态语言的支持

◆更多新的 I/O APIs 即将完成,包括真正的异步I/O 和最终的真实的文件系统 file system API – JSR 203

◆对XML本地语言支持. (可能的probable)

◆Safe rethrow – 允许catch捕获语句让编译器更加聪明的知道基于什么情况下重新throw什么内容。

◆Null dereference expressions – Null 和 ‘?’ syntax 比较,语法类似 Groovy… 让开发者避免过多的空值验证。

◆更好的类型推断 Better type inference

◆多重捕获Multi-catch

◆JSR 296 – Swing 应用框架 application framework – 这方面需要更简单和简洁。

“小的”sun方面的修改有:

◆升级的类加载class loader 架构;

◆XRender pipeline for Java 2D:是Open JDK ntegrators Challenge project项目;

◆Swing 更新 – JXLayer, DatePicker, CSS styling 等;

◆JavaFX

sun方面“快速”的修改,主要是性能更新:

◆并发方面的细微调整 concurrencytweaks (JSR 166),更好的支持Multicore

◆G1 垃圾收集器Garbage collector - 带来更小的中断时间,有希望替代 CMS (Concurrent mark sweep) GC

◆64 bit VM的压缩指针Compressed pointer

◆MVM-lite – 多个虚拟机能够独立运行应用和允许用kill -9杀死java应用。

===========================================================================

Oracle官网申明的new features:

  • Swing
  • IO and New IO
  • Networking
  • Security
  • Concurrency Utilities
  • Rich Internet Applications (RIA)/Deployment
    • Requesting and Customizing Applet Decoration in Dragg able Applets
    • Embedding JNLP File in Applet Tag
    • Deploying without Codebase
    • Handling Applet Initialization Status with Event Handlers
  • Java 2D
  • Java XML - JAXP, JAXB, and JAX-WS
  • Internationalization
  • java.lang Package
    • Multithreaded Custom Class Loaders in Java SE 7
  • Java Programming Language
    • Binary Literals
    • Strings in switch Statements
    • The try-with-resources Statement
    • Catching Multiple Exception Types and Rethrowing Exceptions with Improved Type Checking
    • Underscores in Numeric Literals
    • Type Inference for Generic Instance Creation
    • Improved Compiler Warnings and Errors When Using Non-Reifiable Formal Parameters with Varargs Methods
  • Java Virtual Machine (JVM)
    • Java Virtual Machine Support for Non-Java Languages
    • Garbage-First Collector
    • Java HotSpot Virtual Machine Performance Enhancements
  • JDBC

 

 

 

 

 

你可能感兴趣的:(职场,JDK7,休闲)