java.lang.Object
com.github.hypfvieh.java.maven.plugin.rtcompiler.ForkHelper

public class ForkHelper extends Object
Helper class to create a JVM process running the given compiled static main.
Seit:
1.0.0 - 2024-01-25
Autor:
hypfvieh
  • Konstruktordetails

    • ForkHelper

      public ForkHelper(org.apache.maven.plugin.logging.Log _logger, File _workingDirectory)
  • Methodendetails

    • createAndRunJvm

      public int createAndRunJvm(List<File> _classPath, List<File> _modulePath, String _compiledMain, String[] _args, Properties _systemProperties)
      Create and run the given main class using the given class/module path and arguments.
      Parameter:
      _classPath - class path to use
      _modulePath - module path to use (ignored for java < 9)
      _compiledMain - FQCN main class to execute
      _args - arguments given to compiled main class
      _systemProperties - system properties to set for forked JVM (each will be added as -D option)
      Gibt zurück:
      exit code of forked JVM or -1 if execution of fork failed due to exception