Class AotCommandLineErgonomicsExamples

java.lang.Object
net.jrodolfo.java_evolution.java25.aot_command_line.AotCommandLineErgonomicsExamples

public class AotCommandLineErgonomicsExamples extends Object
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.

  • Constructor Details

    • AotCommandLineErgonomicsExamples

      public AotCommandLineErgonomicsExamples()
  • Method Details

    • runAotWorkflow

      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 inspected
      InterruptedException - when waiting for a child JVM is interrupted
    • probeSource

      public String probeSource()
      Source used by the child JVM.
      Returns:
      generated source-launcher program
    • problem

      public String problem()
      Explains the problem that AOT workflows address.
      Returns:
      a short problem statement
    • java25Idea

      public String java25Idea()
      Explains the Java 25 improvement.
      Returns:
      a short feature explanation
    • productionWorkflow

      public String productionWorkflow()
      Explains how an AOT cache is used after creation.
      Returns:
      a short workflow explanation
    • testBoundary

      public String testBoundary()
      Explains the test boundary for this executable example.
      Returns:
      the project decision