Class AotCommandLineErgonomicsExamples
java.lang.Object
net.jrodolfo.java_evolution.java25.aot_command_line.AotCommandLineErgonomicsExamples
Demonstrates Java 25 Ahead-of-Time (AOT) Command-Line Ergonomics, introduced
by JEP 514.
The example launches a small Java source file twice: first with
-XX:AOTCacheOutput to create a real AOT cache, then with
-XX:AOTCache to use that cache. It proves the command-line workflow,
not a startup-speed improvement.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordResult of the full AOT workflow.static final recordResult from one child JVM invocation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExplains the Java 25 improvement.Source used by the child JVM.problem()Explains the problem that AOT workflows address.Explains how an AOT cache is used after creation.runAotWorkflow(Path workspace) Runs the full AOT cache workflow in a temporary workspace.Explains the test boundary for this executable example.
-
Constructor Details
-
AotCommandLineErgonomicsExamples
public AotCommandLineErgonomicsExamples()
-
-
Method Details
-
runAotWorkflow
public AotCommandLineErgonomicsExamples.AotWorkflowResult runAotWorkflow(Path workspace) throws IOException, InterruptedException Runs the full AOT cache workflow in a temporary workspace.- Parameters:
workspace- temporary directory for the probe source and cache file- Returns:
- result containing both child-JVM runs and cache metadata
- Throws:
IOException- when files cannot be written or inspectedInterruptedException- when waiting for a child JVM is interrupted
-
probeSource
Source used by the child JVM.- Returns:
- generated source-launcher program
-
problem
Explains the problem that AOT workflows address.- Returns:
- a short problem statement
-
java25Idea
-
productionWorkflow
Explains how an AOT cache is used after creation.- Returns:
- a short workflow explanation
-
testBoundary
Explains the test boundary for this executable example.- Returns:
- the project decision
-