一直比较仰慕Java两位大师(James Gosling 、Doug Lea),但是一直没有沉下心深入研究下Java,最近一段的时间请教很多架构师(阿里、腾讯)。
我们最容易忘记的就是最基础的东西,决定执笔写下一些东西,应该算比较全的Java文章,用着蹩脚的英语领略不同的技术视野。
1.Oak 语言
Oak 语言
是James Gosling 博士在1991创建,最初是为Sun微系统公司的机顶盒项目创建的。
Java technology was created as a programming tool in a small, closed-door project
initiated by Patrick Naughton, Mike Sheridan, and James Gosling of Sun in 1991\. But
creating a new language wasn't even the point of "the Green Project."
微信公众号:小猪的互联网江湖
2.JDK Beta
1995年,Oak被命名为Java,因为它已经是Oak Technologies的商标了
第一个Beta版本是发布在1995.5.23 ,提出了"Write Once,Run Anywhere"愿景
第一个公开版本 8个包文件,212的类文件 。
3.JDK 1.0
版本发布时间:第一个版本发布在1996.1.23
第一稳定版本是JDK1.0.2,定义为Java1
JDK 1.0提供了一个纯解释执行的Java虚拟机(Sun Classic VM)。
代表技术:Java虚拟机 、Applet、AWT
4.JDK 1.1
版本发布时间:1997.02.19
核心包
package java.applet
package java.awt
package java.awt.datatransfer
package java.awt.event
package java.awt.image
package java.beans
package java.io
package java.lang
package java.lang.reflect
package java.math
package java.net
package java.rmi
package java.rmi.dgc
package java.rmi.registry
package java.rmi.server
package java.security
package java.security.acl
package java.security.interfaces
package java.sql
package java.text
package java.util
package java.util.zip
新特性:
-
Internationalization(国际化)
-
Security and Signed Applets(安全相关)
-
AWT Enhancements(AWT增强功能)
-
JavaBeans
-
JAR File Format(JAR文件)
-
Networking Enhancements(网络增强功能)
-
IO Enhancements(IO功能增强)
-
Math Package(Math函数包)
-
Remote Method Invocation(RMI远程调用)
-
Object Serialization(序列化)
-
Reflection(反射)
-
JDBC- Connecting Java and Databases(数据库驱动)
-
Inner Classes(内部类)
-
Java Native Interface(JNI扩展)
-
Performance Enhancements(性能优化)
-
Miscellaneous Features (其他特性)
-
Byte, Short and Void Classes
新增byte,short和void类
代表技术:JAR文件格式、JNI、JDBC、JavaBeans、RMI、内部类、反射
5.J2SE 1.2 Playground
版本发布时间:1998.12.08
1998年从1.2开始以后的版本定义为Java2
,直到J2SE 1.5版本,版本名称为J2SE(Java 2 Platform, Standard Edition)
取代了JDK,用来区分企业平台J2EE (Java 2 Platform, Enterprise Edition) and J2ME (Java 2 Platform, Micro Edition),这是Java一个非常重要的版本 ,将Java扩展到59个包、1520个类。
新特性
Basic Features(基础特性)
-
strictfp keyword
新增strictfp 关键字修饰符,用于类、接口或方法 -
Sound
-
Package Version Identification
-
Collections framework(引入集合的特性)
Java Foundation Classes (Java基础类)
-
Abstract Window Toolkit (AWT)
第一代的JavaGUI组建 -
Swing Components
是AWT的非菜单用户界面控件的抽象基类 -
2D Graphics and Imaging
2D绘制组件 -
Input Method Framework
-
Accessibility docs
-
Drag-and-Drop data transfer
Enterprise Features(企业版本特性)
-
Interface Definition Language (IDL)
-
Java Database Connectivity (JDBCTM)
-
Enterprise JavaBean (EJB)
Tool Support(工具支持)
-
Java Virtual Machine Debugger Interface (JVMDI)
-
Java Virtual Machine Profiler Interface (JVMPI)
-
Sun's JVM was equipped with a JIT compiler for the first time
第一次使用JIT编译器 -
Java plug-in
代表技术:EJB、Java Plug-in、Swing、JIT编译器、Collections集合
6.J2SE 1.3 Kestrel
版本发布时间:2000.05.08
新特性:
Java 2 Platform
-
Java Naming and Directory Interface (JNDI) included in core libraries (previously available as an extension)
JNDI是 Java 命名与目录接口,JNDI 提供的间接寻址允许跨企业交付可伸缩的、功能强大且很灵活的应用程序 -
Remote Method Invocation (RMI)
Java远程方法调用,Java的RPC框架基本都是使用RMI -
RMI/IIOP ,RMI was modified to support optional compatibility with CORBA(ORB)
IIOP 是 CORBA 的通信协议。它定义通过 CORBA 客户端与服务器之间的连线发送位的方式 -
Java IDL compiler, idlj
Java IDL 编译器,idlj -
Input Method Framework
输入方法框架、输入法框架 -
Collections Framework Enhancements
-
Support for Motif 2.1
支持 Motif 2.1 -
Synthetic proxy classes
Performance
- HotSpot JVM
1999 年 4 月首次发布 J2SE 1.2 JVM 的 HotSpot JVM
Tool Support
- Java Platform Debugger Architecture (JPDA)
Tools
- Tools and Utilities
代表技术:HotSpot JVM、JPDA、JNDI、RMI远程方法调用、CORBA
7.J2SE 1.4 Merlin
版本发布时间:2004.02.06
微信公众号:小猪的互联网江湖Java 2 Platform
-
Regular expressions modeled after Perl regular expressions(正则表达式)
-
Exception chaining allows an exception to encapsulate original lower-level exception
-
Internet Protocol version 6 (IPv6) support IPv6协议的支持
-
Non-blocking I/O (Java) (named NIO) (specified in JSR 51) NIO 同步非阻塞
-
Logging API (specified in JSR 47) 日志
-
New I/O APIs( buffer management, character-set support, regular-expression - - matching, file I/O, and scalable network I/O)
I/O增强功能: buffer ,正则表达式,文件I/O,网络I/O -
Image I/O Framework 图片I/O
-
Integrated XML parser and XSLT processor (JAXP) (specified in JSR 5 and JSR 63) XML解析的支持
-
Integrated security and cryptography extensions (JCE, JSSE, JAAS)
-
Java Web Start included (Java Web Start was first released in March 2001 for J2SE 1.3) (specified in JSR 56)
-
Preferences API (java.util.prefs)
-
Java 2DTM technology
-
Java Print Service
-
Long-term Persistence of JavaBeansTM Components
-
JDBCTM 3.0 API
-
Assertion Facility,assert keyword (specified in JSR 41)
-
Endorsed Standards Override Mechanism
-
performance enhancements in many areas of the platform
-
Serialization 序列化
-
Java Naming and Directory InterfaceTM (JNDI)
-
CORBA, Java IDL, and RMI-IIOP
-
JavaTM Platform Debugger Architecture
-
JavaTM Plug-in Product
-
Collections Framework (RandomAccess、 LinkedHashMap、IdentityHashMap)
集合新增:(RandomAccess、 LinkedHashMap、IdentityHashMap)
Tools
-
The java application launcher supports command-line options for support of the new Assertions Facility.
-
The javadoc tool
-
The native2ascii tool
-
The idlj tool
-
The orbd tool
-
The servertool(服务器工具)
-
The rmic compiler (rmic 编译器)
-
The graphical Policy Tool utility (图形工具)
代表技术:正则表达式、序列化、NIO、日志类、XML解析器
8.J2SE 5 Tiger
发布版本时间:2004.09.30
微信公众号:小猪的互联网江湖新特性
新的语言特性:
- Generics: provides compile-time (static) type safety for collections and eliminates the need for most typecasts (type conversion) (specified by JSR 14)
泛型的添加
- Metadata: also called annotations; allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities (specified by JSR 175)
元数据(注解),编程语言定义在class、method上,元数据能进行扫描
- Autoboxing/unboxing: automatic conversions between primitive types (such as int) and primitive wrapper classes (such as Integer) (specified by JSR 201)
自动装箱与自动拆箱
- the enum keyword creates a typesafe (specified by JSR 201)
enum类型添加,有序的值列表,以前通过常亮或者构造器来实现
- Varargs: the last parameter of a method can now be declared using a type name followed by three dots (e.g. void drawtext(String... lines));
可变参数的添加 (e.g. void drawtext(String... lines));
- Enhanced for each loop: the for loop syntax is extended (specified by JSR 201)
遍历for循环,使用在数组,可迭代对象
- Improved semantics of execution for multi-threaded Java programs;
改进了多线程Java程序的执行语义;
- the new Java memory model addresses issues of complexity, effectiveness, and performance of previous specifications
新的Java内存模型解决了以前规范的复杂性、有效性和性能问题
- Static imports
静态导入
标准库新增功能
- Automatic stub generation for RMI objects
为RMI对象自动生成存根
-
Swing: New skinnable look and feel, called synth
-
The concurrency utilities in package java.util.concurrent
新增concurrent工具包
- Scanner class for parsing data from various input streams and buffers
新增Scanner class,用于解析来自各种输入流和缓冲区的数据
代表技术:泛型、可变参数、元数据(注解)、自动装箱与自动拆箱、迭代
9.Java SE 6 Mustang
发布版本时间:2006.12.11
微信公众号:小猪的互联网江湖新特性
- Support for older Win9x versions dropped; unofficially, Java 6 Update 7 was the last release of Java shown to work on these versions of Windows.
不再支持较老的Win9x版本;非正式地说,Java 6 Update 7是在这些Windows版本上运行的最后一个Java版本。
- Scripting Language Support (JSR 223): Generic API for tight integration with scripting languages, and built-in MozillaJavaScript Rhino integration.
脚本语言支持(JSR 223):集成脚本语言通用的API,以及内置的Mozilla JavaScript Rhino集成。
- Dramatic performance improvements for the core platform, and Swing.
核心平台和Swing的性能有了显著的改进。
- Improved Web Service support through JAX-WS (JSR 224).
通过JAX-WS (JSR 224)改进了Web服务支持。
- JDBC 4.0 support (JSR 221).
JDBC4.0支持
- Java Compiler API (JSR 199): an API allowing a Java program to select and invoke a Java Compiler programmatically.
Java编译器API (JSR 199):允许Java程序以编程方式选择和调用Java编译器的API。
- Upgrade of JAXB to version 2.0: Including integration of a StAX parser.
JAXB升级到2.0版:包括集成StAX解析器。
- Support for pluggable annotations (JSR 269).
可插拔注解
- Many GUI improvements, such as integration of SwingWorker in the API, table sorting and filtering, and true Swingdouble-buffering (eliminating the gray-area effect).
许多GUI改进,如在API中集成SwingWorker、表排序和过滤,以及真正的swingdouble缓冲(消除灰色区域效应)。
- JVM improvements include: synchronization and compiler performance optimizations, new algorithms and upgrades to existing garbage collection algorithms, and application start-up performance.
JVM优化,同步和编译器性能优化、新算法和对现有垃圾收集算法的升级,以及应用程序启动性能。
代表技术:可插拔注解
10.Java SE 7 Dolphin
发布版本时间:2011.07.28
微信公众号:小猪的互联网江湖- JVM support for dynamic languages, with the new invokedynamic bytecode under JSR-292,following the prototyping work currently done on the Multi Language Virtual Machine
JVM支持动态语言,并在JSR-292下使用新的invokedynamic字节码,这是目前在多语言虚拟机上完成的原型工作的基础上实现的
- Compressed 64-bit pointers (available in Java 6 with -XX:+UseCompressedOops)
压缩64位指针
- These small language changes (grouped under a project named Coin):
这些小的语言变化(分组在一个名为Coin的项目下):
-
Strings in switch(String 使用在swtich)
-
Automatic resource management in try-statement动态资源管理使用在try-statement
-
Improved type inference for generic instance creation, aka the diamond operator <> :添加diamond操作符<>
-
Simplified varargs method declaration(简化的varargs方法声明)
-
Binary integer literals(二进制整数文字)
-
Allowing underscores in numeric literals(允许在数字文字下划线)
-
Catching multiple exception types and rethrowing exceptions with improved type checking(捕获多个异常类型并使用改进的类型检查重新抛出异常)
-
Concurrency utilities under JSR 166
JSR 166下的并发实用程序
- New file I/O library (defined by JSR 203) adding support for multiple file systems, file metadata and symbolic links. The new packages are java.nio.file, java.nio.file.attribute and java.nio.file.spi
新文件I/O库(由JSR 203定义),增加了对多个文件系统、文件元数据和符号链接的支持。新的包是java.nio。文件,java.nio.file。属性和java.nio.file.spi
- Timsort is used to sort collections and arrays of objects instead of merge sort
TimSort是结合了合并排序(合并排序)和插入排序(插入排序)而得出的排序算法,使用在数组和集合里面
- Library-level support for elliptic curve cryptography algorithms
Library-level 支持 椭圆曲线加密算法
- An XRender pipeline for Java 2D, which improves handling of features specific to modern GPUs
一个用于Java 2D的XRender管道,它改进了对特定于现代GPUs的特性的处理
- New platform APIs for the graphics features originally implemented in version 6u10 as unsupported APIs
最初在版本6u10中作为不受支持的api实现的图形特性的新平台api
- Enhanced library-level support for new network protocols, including SCTP and Sockets Direct Protocol
增强了对新的网络协议的库级支持,包括SCTP和Socket协议
- Upstream updates to XML and Unicode
Upstream 更新到XML and Unicode
- Java deployment rule sets
Java部署规则集
代表技术:支持动态语言、SCTP和Socket协议、TimSort
11.Java SE 8 (LTS版本)
发布版本时间:2014.03.18
微信公众号:小猪的互联网江湖新特性
- JSR 335, JEP 126: Supporting lambda expressions also enables functional-style operations on streams of elements, such as MapReduce-inspired transformations on collections.
支持lambda表达式,还支持对元素流的函数式操作,比如集合上MapReduce-inspired 的转换。默认方法允许API的作者在不破坏旧代码的情况下向接口添加新方法。
- JSR 223, JEP 174: Project Nashorn, a JavaScript runtime which allows developers to embed JavaScript code within applications
一个JavaScript运行时,它允许开发人员在应用程序中嵌入JavaScript代码
- JSR 308, JEP 104: Annotation on Java types
新增 Annotation 类型
- Unsigned integer arithmetic
无符号整数算术
-
JSR 337, JEP 120: Repeating annotations
-
JSR 310, JEP 150: Date and time API
日期API
- JEP 178: Statically-linked JNI libraries
静态链接的JNI库
- JEP 153: Launch JavaFX applications (direct launching of JavaFX application JARs)
启动JavaFX应用程序(直接启动JavaFX应用程序jar)
- JEP 122: Remove the permanent generation
JVM移除永久代,新增了元空间
代表技术:lambda 表达式
12.Java SE 9
发布版本时间:2017.09.22
新特性
- JEP 193: Variable handles: define a standard means to invoke the equivalents of variousjava.util.concurrent.atomic and sun.misc.Unsafe operations
工具使用
- JEP 222: jshell: The Java Shell (a Java REPL)
REPL (JShell):交互式编程环境。
- JEP 228: Add More Diagnostic Commands
添加Diagnostic指令
客户端技术
- JEP 263: HiDPI graphics: automatic scaling and sizing
HiDPI 图形:自动缩放和调整大小
- JEP 266: More concurrency updates. It includes a Java implementation of Reactive Streams,including a newFlow class that included the interfaces previously provided by Reactive Streams
响应式流(Reactive Streams)编程
-
JEP 268: XML catalogs
-
JEP 282: jlink(The Java Linker): create a tool that can assemble and optimize a set of modules and their dependencies into a custom run-time image. It effectively allows to produce a fully usable executable including the JVM to run it
-
JEP 295: Ahead-of-time compilation
提前编译
-
JSR 376: Modularization of the JDK under Project Jigsaw (Java Platform Module System)
-
JavaDB was removed from JDK
代表技术:**响应式流(Reactive Streams)、提前编译 **
13.Java SE 10
发布版本时间:2018.03.21
新特性共有12个重要特性
- JEP 286: Local-variable type inference
var 局部变量类型推断。
- JEP 296: Consolidate the JDK forest into a single repository
将原来用 Mercurial 管理的众多 JDK 仓库代码,合并到一个仓库中,简化开发和管理过程。
- JEP 304: Garbage-collector interface
统一的垃圾回收接口。
- JEP 307: Parallel full GC for G1
G1 垃圾回收器的并行完整垃圾回收,实现并行性来改善最坏情况下的延迟。
- JEP 310: Application class-data sharing. This allows application classes to be placed in the shared archive to reduce startup and footprint for Java applications
应用程序类数据 (AppCDS) 共享,通过跨进程共享通用类元数据来减少内存占用空间,和减少启动时间。
- JEP 312: Thread-local handshakes
ThreadLocal 握手交互。在不进入到全局 JVM 安全点 (Safepoint) 的情况下,对线程执行回调。优化可以只停止单个线程,而不是停全部线程或一个都不停。
- JEP 313: Remove the native-header generation tool – javah
移除 JDK 中附带的 javah 工具。可以使用 javac -h 代替。
- JEP 314: Additional Unicode language-tag extensions
使用附加的 Unicode 语言标记扩展。
- JEP 316: Heap allocation on alternative memory devices
能将堆内存占用分配给用户指定的备用内存设备。
- JEP 317: Experimental Java-based JIT compiler. This is the integration of the Graal dynamic compiler for the Linuxx64 platform
使用 Graal 基于 Java 的编译器,可以预先把 Java 代码编译成本地代码来提升效能。
- JEP 319: Root certificates
在 OpenJDK 中提供一组默认的根证书颁发机构证书。开源目前 Oracle 提供的的 Java SE 的根证书,这样 OpenJDK 对开发人员使用起来更方便。
- JEP 322: Time-based release versioning
基于时间定义的发布版本,即上述提到的发布周期。版本号为$FEATURE.$INTERIM.$UPDATE.$PATCH,分别是大版本,中间版本,升级包和补丁版本。
代表技术:G1垃圾回收
14.Java SE 11 (LTS版本)
发布版本时间:2018.09.25
新特性有:
-
JEP 181:Nest-Based访问控制
-
JEP 309: Dynamic class-file constants
动态类文件常量
-
JEP 315:改善Aarch64 intrinsic
-
JEP 318: Epsilon: a no-op garbage collector
无操作垃圾收集器(Epsilon)
-
JEP 320:消除Java EE和CORBA模块
-
JEP 323: Local-variable syntax for lambda parameters
局部变量的语法lambda 参数
-
JEP 331: Low-overhead heap profiling
-
JEP 321: HTTP client (standard)
HTTP客户端(标准)
-
324:Curve25519和Curve448关键协议
-
JEP 328: Flight recorder 飞行记录器
-
329:ChaCha20和Poly1305加密算法
-
JEP 330: Launch Single-File Source-Code Programs
发射一列纵队源代码程序
- JEP 332: Transport Layer Security (TLS) 1.3
传输层安全性(Transport Layer Security,TLS)1.3
- JEP 331: Low-Overhead Heap Profiling
低开销堆分析
- JEP 333:ZGC:A Scalable Low-Latency Garbage Collector (Experimental)
可扩展的低延迟垃圾回收器(实验)
-
JavaFX, Java EE and CORBA modules have been removed from JDK
-
JEP 335: Deprecated the Nashorn JavaScript engine
废弃Nashorn JavaScript引擎
- JEP 336: Deprecate the Pack200 Tools and API
废弃 Pack200工具和API
- Unicode 10.0.0 support (while current version is Unicode 11.0.0, it's only in Java 12)
Unicode 10的支持,Java12 支持 Unicode 11.0.0
代表技术:Epsilon垃圾回收器、ZGC垃圾回收器
15.Java SE 12
发布版本时间:2019.03.19
作为“功能性版本”,JDK 12 总共包含 8 个新的 JEP ,分别为:
-
JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
新增Shenandoah 的垃圾回收器,减少停顿时间 -
JEP 230: Microbenchmark Suite
新增一套微基准测试,使开发者能够基于现有的 Java Microbenchmark Harness(JMH)轻松测试 JDK 的性能,并创建新的基准测试。 -
JEP 325: Switch Expressions (Preview)
对 switch 语句进行扩展 -
JEP 334: JVM Constants API
引入一个 API 来对关键类文件 (key class-file) 和运行时工件的名义描述(nominal descriptions)进行建模,特别是那些可从常量池加载的常量。 -
JEP 340: One AArch64 Port, Not Two
删除与 arm64 端口相关的所有源码,保留 32 位 ARM 移植和 64 位 aarch64 移植。 -
JEP 341: Default CDS Archives
默认生成类数据共享(CDS)存档。 -
JEP 344: Abortable Mixed Collections for G1
当 G1 垃圾回收器的回收超过暂停目标,则能中止垃圾回收过程。 -
JEP 346: Promptly Return Unused Committed Memory from G1
改进 G1 垃圾回收器,以便在空闲时自动将 Java 堆内存返回给操作系统。
代表技术:Shenandoah垃圾回收器
Java的新特性,所有的JEP都会发布在openJdk上
16.JEP
Java expression parser Java表达式分析器
17.JSR规范
JSR是Java Specification Requests的缩写,意思是Java 规范提案。是指向JCP(Java Community Process)提出新增一个标准化技术规范的正式请求。任何人都可以提交JSR,以向Java平台增添新的API和服务。JSR已成为Java界的一个重要标准。
1. Real-time Specification forJava
2. Boundary-ScanAPI
3. JavaTMManagementExtensions(JMXTM)Specification
4. ECperfBenchmarkSpecification
5. XMLParsingSpecification
6. UnifiedPrintingAPI(JavaPrintServiceAPI)
7. IndustrialAutomationExtension
8. OpenServicesGatewaySpecification
9. FederatedManagementArchitectureSpecification
10. PreferencesAPISpecification
11. JAINTMTCAPSpecification
12. JavaTMDataObjects(JDO)Specification
13. DecimalArithmeticEnhancement
14. AddGenericTypesToTheJavaTMProgrammingLanguage
15. ImageI/OFrameworkSpecification
参考资料:
https://en.wikipedia.org/wiki/Java_version_history
http://gcc.uni-paderborn.de/www/WI/WI2/wi2_lit.nsf/64ae864837b22662c12573e70058bbb4/abf8d70f07c12eb3c1256de900638899/$FILE/Java%20Technology%20-%20An%20early%20history.pdf
https://en.wikipedia.org/wiki/Oak_(programming_language)
https://www.javatpoint.com/history-of-java](https://www.javatpoint.com/history-of-java)
https://www.oracle.com/technetwork/java/javase/archive-139210.html
网友评论