Martin Ahrer

Thinking outside the box

Java 13 major language and API improvements

2024-08-08 1 min read Martin

Java ⑬ has been released in September 2019.

The following content is summarizing the most important changes to the Java API, the Java language, and the JVM introduced with Java ⑬.

For a more complete overview follow the links in the following sections referring to the official Oracle release documents.

API improvements

The following describes selected improvements of the Java API. See the Java 13 release notes.

FileSystems

The new newFileSystem method allows to access the content of a file like a file system. Read more in the Java 13 Java API documentation.

New File System
Map<String, String> attributes = Collections.emptyMap();

Path zipPath = Paths.get("./newFileSystem.zip");
Path addedPath;
try (FileSystem fileSystem = FileSystems.newFileSystem(zipPath, attributes)) {
  Path path = fileSystem.getPath("Added.txt");
  addedPath = Files.copy(Path.of("./Try.txt"), path);
}

JVM improvements

The following describes selected improvements of the Java JVM. See the Java 13 release notes.

Class data sharing (CDS) allows class metadata to be shared across different JVM instances to reduce startup time. Java 13 is now delivering Dynamic CDS Archives with JEP 350 that simplifies the process of generating a shared archive when an application is exiting.