Introduction
The Jenesis Launcher turns a modular application into a single executable jar - without giving up its
module graph. You run the jar with java -jar app.. The launcher then rebuilds, in process, what
java -p modulepath -cp classpath -m module/ would have set up: modular dependencies become real named
modules in a fresh ModuleLayer, and plain jars become the unnamed module of the same loader.
The problem it solves
The usual single-jar answer is a fat jar: a tool such as Maven Shade unpacks every dependency and merges
all the classes into one flat jar. The merge is what costs you the modules. Every module-info. lands at
the same path, META-INF/ files collide unless a transformer is configured to merge them, and at run
time there is no module graph left to rebuild.
A launcher jar keeps each dependency in a subfolder of its own instead - jars/, one store, with the
descriptor naming which entries are resolved as modules and which are read as a class path. Nothing collides: each dependency keeps its own descriptor, service files
and resources, and the launcher reads a class straight out of the outer jar when it is first needed. The
dependencies' class bytes are never copied into memory or unpacked to disk.
Comparison with a fat jar sets the two approaches side by side.
When to use it
A launcher jar is the right form when you want one file that runs on any Java 25 or newer with nothing
installed beside it: a command-line tool, a service started with a plain java -jar, an artifact you hand to
someone else. It carries no Java runtime of its own. When the runtime should travel with the program, the
build tool's jpackage image and native image are the alternatives; its
Packaging chapter compares the forms.
What it is
The launcher is a small library, published to Maven Central as build. and
compiled for Java 25. You never call it yourself. The Jenesis build tool resolves it, copies its classes into
the jar it produces, and names it as that jar's Main-Class. A single launcher= line in
packaging. is the whole switch - Producing a launcher jar
shows it.
packaging.properties file in a configuration folder. If that is new to you, read the build
tool's Packaging chapter first.
What's in this section
- Introduction - you are here.
- How it works - the jar layout, the start-up sequence, one loader for named and unnamed modules, and reading on demand.
- Producing a launcher jar - the
launcher=switch, what the build writes, where the jar lands, and how the launcher is pinned.true - Running & troubleshooting - starting a launcher jar, what the single loader means for your code, and the pitfalls.
- Comparison with a fat jar - what flattening destroys and what a launcher jar keeps.
- Reference - every descriptor key and manifest attribute the launcher reads, and which of them the build tool writes.