Skip to content
Michael Wieland edited this page Feb 2, 2018 · 2 revisions

Benefits

  • Better Performance, Memory Management, Locking, Faster Compilation
  • Cleaner design (modular), better encapsulation, smaller deployables

Jigsaw (JDK Refactoring project)

  • JLink: Deploy only the parts of Java you really use
  • Modular system
  • Modul descriptor: modul-info.java in each module
module ch.hsr.test.java9 {
    // modules we are dependent on
    requires javafx.controls; 
    requires javafx.fxml;

    requires ch.hsr.test.java9.services;
    exports ch.hsr.test.java9.private; // public usage 
    exports ch.hsr.test.java9.private to ch.hsr.test.java9.client; // explicit usage 
}
  • jdepts tool als helper für die Generierung der module files

Other Features

  • Reactive Stream API
  • JShell
  • Private interface methods
  • Convenience factory methods for collections
List.of("aaa", "bbb"); // immutable list
Set.of("aaa", "bbb");
Map.of("key", value, "key2", value2); // only up to 10 entries
Map.ofEntries(
    Map.entry("aa", 123),
    Map.entry("bb", 456)
);

Compatibility

  • JavaFX: Supported
  • Gradle: Supported (Building Java 9 Modules)
  • Lombok: Should be supported (see 985 for details)
  • Travis: Should work, try it
  • Logback/SLF4J: Supported
  • SceneBuilder: Supported
  • Guice/Gluon Ignite: Try it
  • JUnit: Supported
Clone this wiki locally