Interface RuntimeBuilder

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface RuntimeBuilder
Creates Java runtime.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    create(AppImageLayout appImageLayout)
    Creates Java runtime in the given app image.
    static List<Path>
    Gets the default set of paths where jlink should look up for system Java modules.
    default boolean
    Returns true if "--strip-native-commands" was not used with jlink.
  • Method Details

    • create

      void create(AppImageLayout appImageLayout)
      Creates Java runtime in the given app image.
      Parameters:
      appImageLayout - the app image where to create Java runtime.
      Implementation Note:
      Java runtime should be created in the directory returned by AppImageLayout.runtimeDirectory() method called on the given app image layout object.
    • withNativeCommands

      default boolean withNativeCommands()
      Returns true if "--strip-native-commands" was not used with jlink. Default implementation returns false.
      Returns:
      true if "--strip-native-commands" was not used with jlink
    • getDefaultModulePath

      static List<Path> getDefaultModulePath()
      Gets the default set of paths where jlink should look up for system Java modules.

      These paths are for jlink command. Using them with ModuleFinder.of(Path...) may not work as expected: attempt to find "java.base" module in these paths will fail.

      Returns:
      the default set of paths where to find Java modules