Skip to content

Latest commit

 

History

History

java-9

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Java 9

JEPs

  • 102 - Process API Updates
  • 110 - HTTP 2 Client
  • 143 - Improve Contended Locking
  • 158 - Unified JVM Logging
  • 165 - Compiler Control
  • 193 - Variable Handles
  • 197 - Segmented Code Cache
  • 199 - Smart Java Compilation, Phase Two
  • 200 - The Modular JDK
  • 201 - Modular Source Code
  • 211 - Elide Deprecation Warnings on Import Statements
  • 212 - Resolve Lint and Doclint Warnings
  • 213 - Milling Project Coin
  • 214 - Remove GC Combinations Deprecated in JDK 8
  • 215 - Tiered Attribution for javac
  • 216 - Process Import Statements Correctly
  • 217 - Annotations Pipeline 2.0
  • 219 - Datagram Transport Layer Security (DTLS)
  • 220 - Modular Run-Time Images
  • 221 - Simplified Doclet API
  • 222 - jshell: The Java Shell (Read-Eval-Print Loop)
  • 223 - New Version-String Scheme
  • 224 - HTML5 Javadoc
  • 225 - Javadoc Search
  • 226 - UTF-8 Property Files
  • 227 - Unicode 7.0
  • 228 - Add More Diagnostic Commands
  • 229 - Create PKCS12 Keystores by Default
  • 231 - Remove Launch-Time JRE Version Selection
  • 232 - Improve Secure Application Performance
  • 233 - Generate Run-Time Compiler Tests Automatically
  • 235 - Test Class-File Attributes Generated by javac
  • 236 - Parser API for Nashorn
  • 237 - Linux/AArch64 Port
  • 238 - Multi-Release JAR Files
  • 240 - Remove the JVM TI hprof Agent
  • 241 - Remove the jhat Tool
  • 243 - Java-Level JVM Compiler Interface
  • 244 - TLS Application-Layer Protocol Negotiation Extension
  • 245 - Validate JVM Command-Line Flag Arguments
  • 246 - Leverage CPU Instructions for GHASH and RSA
  • 247 - Compile for Older Platform Versions
  • 248 - Make G1 the Default Garbage Collector
  • 249 - OCSP Stapling for TLS
  • 250 - Store Interned Strings in CDS Archives
  • 251 - Multi-Resolution Images
  • 252 - Use CLDR Locale Data by Default
  • 253 - Prepare JavaFX UI Controls & CSS APIs for Modularization
  • 254 - Compact Strings
  • 255 - Merge Selected Xerces 2.11.0 Updates into JAXP
  • 256 - BeanInfo Annotations
  • 257 - Update JavaFX/Media to Newer Version of GStreamer
  • 258 - HarfBuzz Font-Layout Engine
  • 259 - Stack-Walking API
  • 260 - Encapsulate Most Internal APIs
  • 261 - Module System
  • 262 - TIFF Image I/O
  • 263 - HiDPI Graphics on Windows and Linux
  • 264 - Platform Logging API and Service
  • 265 - Marlin Graphics Renderer
  • 266 - More Concurrency Updates
  • 267 - Unicode 8.0
  • 268 - XML Catalogs
  • 269 - Convenience Factory Methods for Collections
  • 270 - Reserved Stack Areas for Critical Sections
  • 271 - Unified GC Logging
  • 272 - Platform-Specific Desktop Features
  • 273 - DRBG-Based SecureRandom Implementations
  • 274 - Enhanced Method Handles
  • 275 - Modular Java Application Packaging
  • 276 - Dynamic Linking of Language-Defined Object Models
  • 277 - Enhanced Deprecation
  • 278 - Additional Tests for Humongous Objects in G1
  • 279 - Improve Test-Failure Troubleshooting
  • 280 - Indify String Concatenation
  • 281 - HotSpot C++ Unit-Test Framework
  • 282 - jlink: The Java Linker
  • 283 - Enable GTK 3 on Linux
  • 284 - New HotSpot Build System
  • 285 - Spin-Wait Hints
  • 287 - SHA-3 Hash Algorithms
  • 288 - Disable SHA-1 Certificates
  • 289 - Deprecate the Applet API
  • 290 - Filter Incoming Serialization Data
  • 291 - DEPRECATE THE CONCURRENT MARK SWEEP (CMS) GARBAGE COLLECTOR
  • 292 - IMPLEMENT SELECTED ECMASCRIPT 6 FEATURES IN NASHORN
  • 294 - LINUX/S390X PORT
  • 295 - AHEAD-OF-TIME COMPILATION
  • 297 - UNIFIED ARM32/ARM64 PORT
  • 298 - REMOVE DEMOS AND SAMPLES
  • 299 - Reorganize Documentation

Features

Language

  • Milling Project Coin:
    • More concise try-with-resources statements
    • @SafeVarargs annotation is allowed on private instance methods
    • Use diamond syntax in conjunction with anonymous inner classes
    • Private interface methods are supported
  • The underscore character is not a legal name
  • Platform Logging API and Service
  • Concurrency improvements
  • Collections improvements
  • Method handles improvements
  • Project Jigsaw
    • Creating modules;
    • Exports and requires;
    • Requires transitive;
    • Using non-exported class through its exported interface;
    • Running a module.
  • jlink
    • Tool to assemble and optimized our modules and their deps into a custom runtime image;
    • The runtime image will contain the JVM, only the Java modules we need and our code;
    • The runtime image is generated for the platform we are using (current jdk platform);
    • We can set --launcher option to generate a script to run a module/class.
  • Unified Logging
    • -Xlog to give uniform access to log messages from different subsystems (class loading, threading, GC, module system, so on)

JVM

  • Compact Strings
  • Improve contended locking
    • Improvement in monitor enter and exit, faster notifications
  • Segmented code cache
    • Improvement of code cache by separeting in three segments: Non-method, Profiled and Non-profiled.
    • Command line params to set the size in bytes:
      • -XX:NonMethodCodeHeapSize
      • -XX:ProfiledCodeHeapSize
      • -XX:NonProfiledCodeHeapSize
  • JShell
    • bin: jshell
  • Compiler control
  • Dynamic linking of language defined object models

Sample Projects

The shell script uses env var JAVA9_HOME to jdk-9 dir.

Simple Deps

The calculator module uses math_libs module. The math_api module export an interface:

  • Operation: defines an operation;

The math_lib module export a class:

  • MathIntegerOperations: expose the implementations of Operation;
  • Showing dependencies

To show the deps we need to set modules path if a module use any other define

$JAVA9_HOME/bin/jdeps output/mlibs/mathlib-1.0.jar
$JAVA9_HOME/bin/jdeps --module-path output/mlibs/ output/mlibs/calculator.jar

Services

The provider module exposes a service Calculator using the its implementation HitchhikerCalculator. The consumer uses the exposed service by loooking up using ServiceLoader.

Links