Backend Development 16 min read

New Features in JDK 10: A Comprehensive Overview of JEPs, API Additions, and Specification Changes

This article provides a detailed overview of JDK 10’s new features, including the twelve JEPs such as local‑variable type inference, expanded class‑data sharing, new APIs, JVM and language specification updates, and highlights the impact of these changes for Java developers.

Java Architect Essentials
Java Architect Essentials
Java Architect Essentials
New Features in JDK 10: A Comprehensive Overview of JEPs, API Additions, and Specification Changes

The article introduces JDK 10, noting that it has reached the release‑candidate milestone shortly after JDK 9 and aims to list all the changes, both additions and removals, based on publicly available JEPs, the OpenJDK bug database, and the Java SE 10 public review specification.

Key JEPs (12 total):

[286] Local‑variable type inference – introduces the var keyword, allowing the compiler to infer the type of a local variable, e.g., var x = new ArrayList<String>(); . var is a reserved word, not a keyword, so it can still be used as an identifier.

[310] Application Class‑Data Sharing (CDS) – extends CDS to internal system, platform, and custom class loaders, beyond the bootstrap loader.

[314] Additional Unicode language‑tag extensions – enhances java.util.Locale to support more BCP‑47 tags such as currency, first day of week, region, and time‑zone.

[322] Time‑based version strings – refines the JDK version string format and removes the INTERIM element.

[319] Root certificates – provides a default set of CA root certificates for TLS in OpenJDK builds.

[307] Parallel full‑GC for G1 – adds a parallel complete‑collection mechanism to the G1 garbage collector.

[313] Removal of the native‑header generation tool – javac now generates JNI headers directly.

[304] Garbage‑collector interface – a JVM‑internal API for easier integration of new collectors.

[312] Thread‑local variable control – enables thread callbacks without a global safepoint.

[316] Heap allocation on alternative storage devices – allows the JVM to use non‑volatile RAM with DRAM‑like performance.

[317] Experimental Java‑based JIT compiler – introduces Graal‑based JIT research and the Metropolis project.

[296] Consolidation of JDK source repositories – merges the eight JDK 9 repositories into a single repository for atomic commits.

New Standard Library APIs (73 additions): Highlights include java.awt.Toolkit.getMenuShortcutKeyMaskEx() , java.awt.geom.Path2D.trimToSize() , overloaded java.io.ByteArrayOutputStream.toString(Charset) , new constructors with Charset parameters for PrintStream and PrintWriter , java.io.Reader.transferTo(Writer) , version‑query methods in java.lang.Runtime.Version , stack‑walker enhancements, new methods in java.lang.invoke.MethodType , process‑id retrieval via java.lang.management.RuntimeMXBean.getPid() , and numerous collection, optional, and stream collector additions such as Collectors.toUnmodifiableList() , toUnmodifiableSet() , and toUnmodifiableMap() . Additional updates affect java.util.Properties , java.util.SplittableRandom , FutureTask , StampedLock , JAR entry handling, locale name providers, and more.

JVM Specification Changes: Minor updates include modifications to class‑file format flags, module attributes (disallowing ACC_TRANSITIVE or ACC_STATIC_PHASE for non‑ java.base modules), a revised definition of the dup2 instruction, and allowing user‑defined class loaders (except bootstrap) during initial class or interface creation.

Java Language Specification Changes: Several sections are updated to support local‑variable type inference, such as new token TypeIdentifier , adjustments to identifier equivalence, enhanced for‑statement, try‑with‑resources, and import rules, as well as numerous small changes throughout the grammar to accommodate var usage.

The article concludes with a disclaimer that the information is compiled from publicly available sources and may change before the final JDK 10 release.

JavaProgrammingAPInew featuresJEPJDK10language spec
Java Architect Essentials
Written by

Java Architect Essentials

Committed to sharing quality articles and tutorials to help Java programmers progress from junior to mid-level to senior architect. We curate high-quality learning resources, interview questions, videos, and projects from across the internet to help you systematically improve your Java architecture skills. Follow and reply '1024' to get Java programming resources. Learn together, grow together.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.