# jlink's Missing Link: API Signature Validation

DevFeed: [jlink's Missing Link: API Signature Validation](<https://devfeed.tech/articles/jlink-s-missing-link-api-signature-validation-18843.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/jlinks-missing-link-api-signature-validation/>)

Published: 2020-12-28T11:20:00Z

Content type: tutorial

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [API](<https://devfeed.tech/topics/api.md>), [Code](<https://devfeed.tech/topics/code.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [code](<https://devfeed.tech/tags/code.md>), [java](<https://devfeed.tech/tags/java.md>), [jdk](<https://devfeed.tech/tags/jdk.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [validation](<https://devfeed.tech/tags/validation.md>)

## AI overview

This article explains how Java's jlink link-time phase can do more than reduce runtime image size. It describes using link-time validation to detect incompatible API signatures between modularized Java application components before related errors occur at application runtime.

## Source excerpt

Table of Contents The Example The API Signature Check jlink Plug-in Summary Discussions around Java's jlink tool typically center around savings in terms of (disk) space. Instead of shipping an entire JDK, a custom runtime image created with jlink contains only those JDK modules which an application actually requires, resulting in smaller distributables and container images. But the contribution of jlink -- as a part of the Java module system at large -- to the development of Java application's is bigger than that: with the notion of link time it defines an optional complement to the well known phases compile time and application run-time: Link time is an opportunity to do whole-world optimizations that are otherwise difficult at compile time or costly at run-time. An example would be to optimize a computation when all its inputs become constant (i.e., not unknown). A follow-up optimization would be to remove code that is no longer reachable.