Share
Embed
Transcript
25 slides
-
のつくり方 Java OpenJDK - JDK Project のプロジェクトをまとめて OpenJDK JDK を作成
半年ごとの定期リリース できたものからリリース Java 25: 2025/09/16 Java 26: 2026/03/17 LTS はディストリビュータが決める Oracle, Red Hat は2年周期 LTS: 11, 17, 21, 25... -
OpenJDK Group Compiler HotSpot Core Libs et al. Project sponsored
Amber Valhalla Leyden et al. JEP proposed proposed JDK Enhancement Proposal -
JEP: JDK Enhancement Proposal JDK に対する機能提案 新機能だけでなく、 機能の削除も お試し機能と正式な機能 Preview
JEP Incubator JEP Experimental JEP 言語仕様 コアライブラリ VM コアライブラリ以外のAPI Standard JEP 正式機能 -
JEP: JDK Enhancement Proposal JDK に対する機能提案 新機能だけでなく、 機能の削除も お試し機能と正式な機能 Preview
JEP Incubator JEP Experimental JEP 言語仕様 コアライブラリ VM コアライブラリ以外のAPI Standard JEP 正式機能 -
Java 22 423: Region Pinning for G1 454: Foreign Function
& Memory API 456: Unnamed Variables & Patterns 458: Launch Multi-File Source-Code Programs Java 23 467: Markdown Documentation Comments 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal 474: ZGC: Generational Mode by Default Java 24 472: Prepare to Restrict the Use of JNI 475: Late Barrier Expansion for G1 479: Remove the Windows 32-bit x86 Port 483: Ahead-of-Time Class Loading & Linking 484: Class-File API 485: Stream Gatherers 486: Permanently Disable the Security Manager 490: ZGC: Remove the Non-Generational Mode 491: Synchronize Virtual Threads without Pinning 493: Linking Run-Time Images without JMODs 496: Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism 497: Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe 501: Deprecate the 32-bit x86 Port for Removal Java 25 470: PEM Encodings of Cryptographic Objects (Preview) 502: Stable Values (Preview) 503: Remove the 32-bit x86 Port 505: Structured Concurrency (Fifth Preview) 506: Scoped Values 507: Primitive Types in Patterns, instanceof, and switch (Third Preview) 508: Vector API (Tenth Incubator) 509: JFR CPU-Time Pro ling (Experimental) 510: Key Derivation Function API 511: Module Import Declarations 512: Compact Source Files and Instance Main Methods 513: Flexible Constructor Bodies 514: Ahead-of-Time Command-Line Ergonomics 515: Ahead-of-Time Method Pro ling 518: JFR Cooperative Sampling 519: Compact Object Headers 520: JFR Method Timing & Tracing 521: Generational Shenandoah Java 22, 23, 24 は Standard JEP のみ -
Java 22 423: Region Pinning for G1 454: Foreign Function
& Memory API 456: Unnamed Variables & Patterns 458: Launch Multi-File Source-Code Programs Java 23 467: Markdown Documentation Comments 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal 474: ZGC: Generational Mode by Default Java 24 472: Prepare to Restrict the Use of JNI 475: Late Barrier Expansion for G1 479: Remove the Windows 32-bit x86 Port 483: Ahead-of-Time Class Loading & Linking 484: Class-File API 485: Stream Gatherers 486: Permanently Disable the Security Manager 490: ZGC: Remove the Non-Generational Mode 491: Synchronize Virtual Threads without Pinning 493: Linking Run-Time Images without JMODs 496: Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism 497: Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe 501: Deprecate the 32-bit x86 Port for Removal Java 25 470: PEM Encodings of Cryptographic Objects (Preview) 502: Stable Values (Preview) 503: Remove the 32-bit x86 Port 505: Structured Concurrency (Fifth Preview) 506: Scoped Values 507: Primitive Types in Patterns, instanceof, and switch (Third Preview) 508: Vector API (Tenth Incubator) 509: JFR CPU-Time Pro ling (Experimental) 510: Key Derivation Function API 511: Module Import Declarations 512: Compact Source Files and Instance Main Methods 513: Flexible Constructor Bodies 514: Ahead-of-Time Command-Line Ergonomics 515: Ahead-of-Time Method Pro ling 518: JFR Cooperative Sampling 519: Compact Object Headers 520: JFR Method Timing & Tracing 521: Generational Shenandoah Java 22, 23, 24 は Standard JEP のみ 宣言的記法 小さなオブジェクト 初心者に優しく 起動時間短縮 Safety/Integrity -
Java 22 423: Region Pinning for G1 454: Foreign Function
& Memory API 456: Unnamed Variables & Patterns 458: Launch Multi-File Source-Code Programs Java 23 467: Markdown Documentation Comments 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal 474: ZGC: Generational Mode by Default Java 24 472: Prepare to Restrict the Use of JNI 475: Late Barrier Expansion for G1 479: Remove the Windows 32-bit x86 Port 483: Ahead-of-Time Class Loading & Linking 484: Class-File API 485: Stream Gatherers 486: Permanently Disable the Security Manager 490: ZGC: Remove the Non-Generational Mode 491: Synchronize Virtual Threads without Pinning 493: Linking Run-Time Images without JMODs 496: Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism 497: Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe 501: Deprecate the 32-bit x86 Port for Removal Java 25 470: PEM Encodings of Cryptographic Objects (Preview) 502: Stable Values (Preview) 503: Remove the 32-bit x86 Port 505: Structured Concurrency (Fifth Preview) 506: Scoped Values 507: Primitive Types in Patterns, instanceof, and switch (Third Preview) 508: Vector API (Tenth Incubator) 509: JFR CPU-Time Pro ling (Experimental) 510: Key Derivation Function API 511: Module Import Declarations 512: Compact Source Files and Instance Main Methods 513: Flexible Constructor Bodies 514: Ahead-of-Time Command-Line Ergonomics 515: Ahead-of-Time Method Pro ling 518: JFR Cooperative Sampling 519: Compact Object Headers 520: JFR Method Timing & Tracing 521: Generational Shenandoah 宣言的記法 小さなオブジェクト 初心者に優しく 起動時間短縮 Safety/Integrity Java 22 423: Region Pinning for G1 454: Foreign Function & Memory API 456: Unnamed Variables & Patterns 458: Launch Multi-File Source-Code Programs Java 23 467: Markdown Documentation Comments 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal 474: ZGC: Generational Mode by Default Java 24 472: Prepare to Restrict the Use of JNI 475: Late Barrier Expansion for G1 479: Remove the Windows 32-bit x86 Port 483: Ahead-of-Time Class Loading & Linking 484: Class-File API 485: Stream Gatherers 486: Permanently Disable the Security Manager 490: ZGC: Remove the Non-Generational Mode 491: Synchronize Virtual Threads without Pinning 493: Linking Run-Time Images without JMODs 496: Quantum-Resistant Module-Lattice-Based Key Encapsulation Mechanism 497: Quantum-Resistant Module-Lattice-Based Digital Signature Algorithm 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe 501: Deprecate the 32-bit x86 Port for Removal Java 25 470: PEM Encodings of Cryptographic Objects (Preview) 502: Stable Values (Preview) 503: Remove the 32-bit x86 Port 505: Structured Concurrency (Fifth Preview) 506: Scoped Values 507: Primitive Types in Patterns, instanceof, and switch (Third Preview) 508: Vector API (Tenth Incubator) 509: JFR CPU-Time Pro ling (Experimental) 510: Key Derivation Function API 511: Module Import Declarations 512: Compact Source Files and Instance Main Methods 513: Flexible Constructor Bodies 514: Ahead-of-Time Command-Line Ergonomics 515: Ahead-of-Time Method Pro ling 518: JFR Cooperative Sampling 519: Compact Object Headers 520: JFR Method Timing & Tracing 521: Generational Shenandoah -
初心者に優しく Gavin Bierman Javaは初心者にとってハードルが高い? お約束事が多い 説明の難しい概念が ... 実行までの道のりが長い JEP 458:
Launch Multi-File Source-Code Programs JEP 511: Module Import Declarations JEP 512: Compact Source Files and Instance Main Methods -
Hello, World! Hello.java public class Hello { public static void
main(String... args) { System.out.println("Hello, World!")); } } ? void main() { IO.println("Hello, World!")); } クラス不要 メソッド簡略化 標準入出力クラス main -
宣言的記法 ・ 小さなオブジェクト Brian Goetz Java 8: Project Lambdaからの流れ 文から式へ
少数のミュータブルな大きいオブジェクトから 多数のイミュータブルな小さいオブジェクトへ 手続き型から宣言型へ JEP 485: Stream Gatherers JEP 513: Flexible Constructor Bodies JEP 519: Compact Object Headers JEP 401: Value Classes and Objects 導入時期未定 -
Stream Gatherer Stream API の中間操作の拡充 中間操作で状態を保持可能 のような動作が可能 Collector List<Double> nums
= ...; List<Double> movingAves = nums.stream() .gather(Gatherers.windowSliding(3)) .map(f -> f.stream() .collect(Collectors.averagingDouble(x -> x))) .toList(); 例 : 移動平均 3データをまとめる -
Compact Object Header Roman Kennke Compact Object Header - Project
Lilliput ヒープでのオブジェクトヘッダーのサイズがあなどれない record Point( double x, double y ) {} Header double double 128bit (16byte) 64bit (8byte) 64bit (8byte) 未使用ビットの見直しなどで 64bit 64bit (8byte) 128bit -
起動時間短縮 Mark Reinhold - Project Leyden コンテナ サーバーレス 実行環境の変化 起動時間がボトルネック
Project Leyden 起動時間短縮 ピークパフォーマンスに至る時間短縮 フットプリント削減 -
起動時間短縮 - Project Leyden JEP 483: Ahead-of-Time Class Loading &
Linking JEP 514: Ahead-of-Time Command-Line Ergonomics JEP 515: Ahead-of-Time Method Pro ling クラスロード後のイメージをキャッシュ化 プロファイリング結果をキャッシュ化 JEP Draft: Ahead-of-Time Code Compilation ネイティブイメージ作成 導入時期未定 -
Safety / Integrity 安全性の追及は常に セキュリティ関連 API ポスト量子暗号の対応など 保守できない機能の削除 ポーティング削除など 32bit
WIndows 安全に使うためのデフォルト動作の変更 使用時に警告 今後は原則禁止 JNI Ron Pressler やリフレクションなども FMM -
Reference OpenJDK JDK Project https://openjdk.org/projects/jdk/ JEP https://openjdk.org/projects/valhalla/ Project Valhalla https://openjdk.org/jeps/0
Project Lilliput Wiki https://wiki.openjdk.org/spaces/lilliput/overview YouTube: JVM Language Summit 2025 https://youtube.com/playlist?list=PLX8CzqL3ArzUOgZpIX6GsoRhPbnij-sco Project Leyden https://openjdk.org/projects/leyden/