Class Ek9ExecutableJarBuilder

java.lang.Object
org.ek9lang.compiler.backend.Ek9ExecutableJarBuilder

public final class Ek9ExecutableJarBuilder extends Object
THE single builder of an EK9 executable "fat" jar from a compiled project — extracted so the CLI (Ec.repackageTargetArtefact) and the IDE (PipelineRunner.buildForDebug) share ONE packaging path and cannot drift (they had a private copy in the CLI only, which is why the IDE's debug build produced no jar). The jar bundles, in order:
  1. the project's non-compilable resources (kept at their project-relative paths);
  2. the MAIN generated classes — which INCLUDE ek9.Main, the JVM entry point, and its argument marshalling (MainClassGenerator / MainEntryVisitor);
  3. the DEV generated classes, when devBuild (so @Test programs are runnable);
  4. the EK9 core runtime (org.ek9.lang.*), extracted via RuntimeClassExtractor.
and sets Main-Class: ek9.Main.

Classes come from the ConstructOutputSink directly when it held them in memory (the CLI's in-memory build) and otherwise from the generated dirs on disk (the IDE's FileConstructOutputSink), so the one method serves both back ends. Only a JVM build is packaged.

  • Constructor Details

    • Ek9ExecutableJarBuilder

      public Ek9ExecutableJarBuilder()
  • Method Details