2019年4月16日,Oracle發布了新的JDK 8的更新,版本號為8u211/8u212。與以往不同的是,新版本的許可協議從BCL換成了OTN,這就意味着,你不能在生產環境使用這個版本了,個人用途還是可以的。如果你想繼續使用新版本,就需要給Oracle交錢了,我選擇了最后一個免費穩定版JDK 8u201,它是2019.1.15發布的。


https://www.oracle.com/technetwork/java/javase/8u201-relnotes-5209271.html
https://www.oracle.com/technetwork/java/javase/documentation/8u-relnotes-2225394.html
https://www.oracle.com/technetwork/java/javase/jdk8-naming-2157130.html
我用的JDK使用什么協議?
BCL協議,即Oracle Binary Code License Agreement,協議規定你可以使用JDK,但是不能進行修改。私用和商用都可以,但是JDK中的某些商業特性,是需要付費才可以使用的。
OTN協議,即Oracle Technology Network License Agreement,目前新發布的JDK用的都是這個協議,可以私用,商用需要付費。從下圖可以看出各個版本對應的協議:

我不想掏錢怎么辦?
商用的話使用上面BCL協議的版本,私用怎么着都行。很多時候,開發者會對什么版本用了什么協議比較迷惑,懶得搞清楚,那么可以直接使用OpenJDK。
OpenJDK是一個基於GPLv2+CE協議的開源JDK實現,他由OpenJDK社區來運作,作為OpenJDK社區的主導者,Oracle也在盡量減少OpenJDK和Oracle JDK的差別(source),將一些商業特性移植到了OpenJDK上,比如Java Flight Recorder,Java Mission Control和ZGC等等。對於普通開發者,兩者差異可忽略不計。OpenJDK同樣會每6個月發布一個新版本,不過每次新的版本發布后,舊的就不維護了,比如OpenJDK 12發布之后,11版本便停止更新,停留在11.0.2版本,沒有LTS一說了。
除了Oracle的OpenJDK,還有很多免費OpenJDK實現可以用,比如 Zulu,AdoptOpenJDK,Amazon的Corretto和阿里巴巴的dragonwell等等。具體他們有什么區別,我們以后再說。
我們大廠願意掏錢怎么辦?
可以通過訂閱Java SE Subscription來付費,桌面用途每人每月2.5刀,服務器用途每個處理器每月25刀,量多還有優惠。Oracle以前還提供Java SE Advanced, Java SE Advanced Desktop和 Java SE Suite等一次性授權,不過現在都建議新老付費用戶換成訂閱制了。
Oracle為什么這么做
當然是賺錢,OTN協議的Oracle JDK現在允許私用也只是想讓開發者養成習慣,將來開發者搞公司項目的時候,非常有可能會習慣性去Oracle官網下載JDK,這樣就導導致了商用項目未經許可違規使用。Oracle法務部的刀肯定老早就磨好了。
官網下載地址都是最新版本,我們要找到歸檔版本,免費注冊賬號即可下載,但速度很慢,建議通過國內途徑下載,例如百度網盤。
Java SE 8 Archive Downloads (JDK 8u202 and earlier)
Go to the Oracle Java Archive
The JDK is a development environment for building applications using the Java programming language.
The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the JavaTM platform.
WARNING: These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production.
These Java SE 8 update releases are provided under the Binary Code License (“BCL”).
Java SE 8u211 and later updates are available, under the Java SE OTN License.
For production use Oracle recommends downloading the latest JDK and JRE versions and allowing auto-update.
Only developers and Enterprise administrators should download these releases.
Downloading these releases requires an oracle.com account. If you don't have an oracle.com account you can use the links on the top of this page to learn more about it and register for one for free.
For current Java releases, please consult the Oracle Software Download page.
https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html

