JDK9 新機能 (日本語&ショートバージョン) #jjug
-
Upload
yuji-kubota -
Category
Technology
-
view
7.690 -
download
0
Transcript of JDK9 新機能 (日本語&ショートバージョン) #jjug
おやくそく•OpenJDK 準拠です
•本スライドはサマリであり、GAが出るまでに一部変更になる場合もあります。
•酔ってるので適当に話します :p
•本スライドはサマリのサマリです•http://goo.gl/FFS9zL (やや詳細版)
http://openjdk.java.net/projects/jdk9/ (31/Jul/2015)
Who am I
•KUBOTA Yuji (@sugarlife)
•icedtea committer (HeapStats)
•JVM 芸人
•難聴者
What features will come?102: Process API Updates110: HTTP 2 Client143: Improve Contended Locking158: Unified JVM Logging165: Compiler Control193: Variable Handles197: Segmented Code Cache199: Smart Java Compilation, Phase Two201: Modular Source Code211: Elide Deprecation Warnings on Import Statements212: Resolve Lint and Doclint Warnings213: Milling Project Coin214: Remove GC Combinations Deprecated in JDK 8215: Tiered Attribution for javac216: Process Import Statements Correctly217: Annotations Pipeline 2.0219: Datagram Transport Layer Security (DTLS)220: Modular Run-Time Images221: Simplified Doclet API222: jshell: The Java Shell (Read-Eval-Print Loop)223: New Version-String Scheme224: HTML5 Javadoc226: UTF-8 Property Files227: Unicode 7.0228: Add More Diagnostic Commands229: Create PKCS12 Keystores by Default230: Microbenchmark Suite231: Remove Launch-Time JRE Version Selection232: Improve Secure Application Performance233: Generate Run-Time Compiler Tests Automatically235: Test Class-File Attributes Generated by javac236: Parser API for Nashorn237: Linux/AArch64 Port240: Remove the JVM TI hprof Agent241: Remove the jhat Tool243: Java-Level JVM Compiler Interface244: TLS Application-Layer Protocol Negotiation Extension245: Validate JVM Command-Line Flag Arguments246: Leverage CPU Instructions for GHASH and RSA247: Compile for Older Platform Versions248: Make G1 the Default Garbage Collector249: OCSP Stapling for TLS250: Store Interned Strings in CDS Archives251: Multi-Resolution Images252: Use CLDR Locale Data by Default253: Prepare JavaFX UI Controls & CSS APIs for Modularization254: Compact Strings255: Merge Selected Xerces 2.11.0 Updates into JAXP256: BeanInfo Annotations257: Update JavaFX/Media to Newer Version of GStreamer258: HarfBuzz Font-Layout Engine
What features will come?102: Process API Updates110: HTTP 2 Client143: Improve Contended Locking158: Unified JVM Logging165: Compiler Control193: Variable Handles197: Segmented Code Cache199: Smart Java Compilation, Phase Two201: Modular Source Code211: Elide Deprecation Warnings on Import Statements212: Resolve Lint and Doclint Warnings213: Milling Project Coin214: Remove GC Combinations Deprecated in JDK 8215: Tiered Attribution for javac216: Process Import Statements Correctly217: Annotations Pipeline 2.0219: Datagram Transport Layer Security (DTLS)220: Modular Run-Time Images221: Simplified Doclet API222: jshell: The Java Shell (Read-Eval-Print Loop)223: New Version-String Scheme224: HTML5 Javadoc226: UTF-8 Property Files227: Unicode 7.0228: Add More Diagnostic Commands229: Create PKCS12 Keystores by Default230: Microbenchmark Suite231: Remove Launch-Time JRE Version Selection232: Improve Secure Application Performance233: Generate Run-Time Compiler Tests Automatically235: Test Class-File Attributes Generated by javac236: Parser API for Nashorn237: Linux/AArch64 Port240: Remove the JVM TI hprof Agent241: Remove the jhat Tool243: Java-Level JVM Compiler Interface244: TLS Application-Layer Protocol Negotiation Extension245: Validate JVM Command-Line Flag Arguments246: Leverage CPU Instructions for GHASH and RSA247: Compile for Older Platform Versions248: Make G1 the Default Garbage Collector249: OCSP Stapling for TLS250: Store Interned Strings in CDS Archives251: Multi-Resolution Images252: Use CLDR Locale Data by Default253: Prepare JavaFX UI Controls & CSS APIs for Modularization254: Compact Strings255: Merge Selected Xerces 2.11.0 Updates into JAXP256: BeanInfo Annotations257: Update JavaFX/Media to Newer Version of GStreamer258: HarfBuzz Font-Layout Engine
( ゚д゚ )
ひとまとめ (1)
•ダイエット or 最適化シリーズ•コード変更なしで JVM が速くなるシリーズ•143: Improve Contended Locking•197: Segmented Code Cache•254: Compact Strings•232: Improve Secure Application
Performance•246: Leverage CPU Instructions
for GHASH and RSA (intel x64/SPARC)
ひとまとめ (2)
•Project Jigsaw•220: Modular Run-Time Images•モジュール化による XML 地獄や依存性地獄からの脱却、等
•前準備•201: Modular Source Code•253: Prepare JavaFX UI Controls
& CSS APIs for Modularization
ひとまとめ (3)
• javac 関係• 199: Smart Java Compilation, Phase
Two• 215: Tiered Attribution for javac• 216: Process Import Statements
Correctly• 217: Annotations Pipeline 2.0• 235: Test Class-File Attributes
Generated by javac• 247: Compile for Older Platform
Versions
102: Process API Updates
•プロセス情報を扱う API が実はなかったので追加。
110: HTTP 2 Client
•SPDYなどを含む HTTP/2 APIを追加。
158: Unified JVM Logging
•今頃 JVM のログフォーマットやオプションを統一しようぜという流れ
•ログパーサ開発者は要注意
165: Compiler Control
•コンパイラを詳細に制御したい変態御用達ツール•c1・c2 それぞれに詳細設定可能•しかも動作中のJVMにも設定可能
(おまけ) sun.misc.Unsafe 動向• 6/15-16 に行われた JCP Executive Committee Meeting で隠蔽・削除
に向けた影響や代替方法などの話し合いが行われた• 元々 sun.* 等は Jigsaw(module化) 関係で処遇を決める必要があった
• JCP Meeting の議題はここ、Unsafeに関する議事録はここ。
• この代替方法の最初のステップとして先の VarHandles が提案され、つい最近(7月)に JDK9 に盛り込まれることが決まった• VarHandles Project 詳細 (JVM Language Summit 2014)
http://www.oracle.com/technetwork/java/jvmls2014sandoz-2265216.pdf
• 今のところは• sun.misc.Unsafe などが deprecated / removed される時期は未明
• sun.misc.Unsafe を含む重要な内部 API はJDK9 では隠蔽のみ、JDK10 では削除したいという方向に議論が進んでいる (ソース:ML, JEP260)
• 代替方法も提案されているが実際に実装が揃うのはこれから
• という状況なので、JDK9 で使う方法を含めた具体的な実装はまだこれからですが、準備は意識した方が良いです。Feature Complete で確認しましょう :) なお、黒魔術なので仕組みを理解してから使いましょう
211: Elide Deprecation Warnings on Import Statements
•オオカミ少年化した warning を一部削減
212: Resolve Lint and DoclintWarnings
•放置されてた OpenJDK ビルドの際に出る warning を修正
213: Milling Project Coin•Project Coin (微細版).• IDEに任せれば良いので割愛
214: Remove GC Combinations Deprecated in JDK 8•使われない GC 組合せを削除• DefNew + CMS / iCMS• ParNew + SerialOld / iCMS•CMS foreground(s)
• UseCMSCompactAtFullCollection• CMSFullGCsBeforeCompaction• UseCMSCollectionPassing
219: Datagram Transport Layer Security (DTLS)
•API for DTLS 1.0 (RFC 4347) and DTLS 1.2 (RFC 6347)•DTLS は Datagram Transport Layer
Security(データグラム・トランスポート・レイヤー・セキュリティー)の略で、インターネット上で安全にデータを送受信するための技術のひとつ。by NTTPC http://www.nttpc.co.jp/yougo/DTLS.html
221: Simplified Doclet API
•Docklet API の置換え(com.sun.javadoc) .
222: jshell: The Java Shell (Read-Eval-Print Loop)
•CLI で Java 文法を直実行
•困ったら@bitter_fox へ!
223: New Version-String Scheme
•例:1.8.0_20-b62 -> 9.1.2+62
•$MAJOR.$MINOR.$SECURITY
224: HTML5 Javadoc
http://www.w3.org/html/logo/
226: UTF-8 Property Files
•UTF-8 property files が使える
227: Unicode 7.0
•たいとるおんりー
228: Add More Diagnostic Commands
•変態御用達コマンド•print_class_summary (loaded classes)•print_codegenlist (method queued)•print_vm_state•print_uft8pool•datadump_request (heapdump?)•dump_codelist (n-methods)•print_codeblocks (code cache)•set_vmflag
229: Create PKCS12 Keystoresby Default
•デフォルトのセキュリティ強化
230: Microbenchmark Suite
•JMH++
231: Remove Launch-Time JRE Version Selection
•-version: オプション削除•-version ではない。: が付く方
•jar ファイルの “JRE-Version” 項目をマニフェストファイルから削除
233: Generate Run-Time Compiler Tests Automatically
•コンパイラテスト自動生成
•JVM マニアご用達。具体的には新しい CPU instructions を試したり、最適化効果を試したりするのに使う
236: Parser API for Nashorn
•IDE で Nashorn 対応 (のために Parser API を追加)
237: Linux/AArch64 Port
•ARM®
240: Remove the JVM TI hprofAgent
•Good bye hprof•ちなみに Lambda でバグってる筈
•個人的な代用品リスト•OProfile•perf•YourKit•SystemTap (for debug)
241: Remove the jhat Tool
•Good bye jhat
•個人的な代用品リスト•Eclipse MAT•HeapStats
243: Java-Level JVM Compiler Interface
•JVM JIT の挙動をAPIからトレース可能に。
244: TLS Application-Layer Protocol Negotiation Extension
•HTTP/2 サポート(JEP110)に向けて、javax.net.ssl で TLS ALPN をサポート。
245: Validate JVM Command-Line Flag Arguments
•一部の JVM オプションで範囲外を指定しても、それが伝わらないメッセージを出力して終了していたのを修正
248: Make G1 the Default Garbage Collector
•Oracle の鶴の一声からG1GCをデフォルト化
•デフォルトで使ってませんよね?じゃあ大丈夫。そうじゃなかったら場合によっては死
249: OCSP Stapling for TLS
•TLS. Support RFC 6961.
250: Store Interned Strings in CDS Archives
•G1GC 使用時に Interned String が Class-Data Sharing という領域に配置される
•Interned String の住所歴•Permanent Gen (JDK6)•Java Heap (JDK7-8)•Class-Data Sharing (JDK9+G1)
251: Multi-Resolution Images
•A new java.awt.image API for multi-resolution image.
y
y/2x/2
x
252: Use CLDR Locale Data by Default
•Use locale data from the Unicode Common Locale Data Repository.
255: Merge Selected Xerces2.11.0 Updates into JAXP
•To update JAXP from Xerces2.7.1 to 2.11.0.
256: BeanInfo Annotations
•Replace @beaninfo .•@interface JavaBean {…}•@interface BeanProperty {…}•@interface SwingContainer{…}
257: Update JavaFX/Media to Newer Version of GStreamer
•Update GStreamer.•GStreamer: multimedia framework.
258: HarfBuzz Font-Layout Engine
•ICU から HarfBuzz にフォントレンダリングを変更