APIdia Launch Partner
Top Description Methods
jdk.jpackage.internal.model

public Interface RuntimeBuilder

Known Direct Implementers
jdk.jpackage.internal.JLinkRuntimeBuilder
Annotations
@FunctionalInterface
Imports
java.lang.module.ModuleFinder, java.nio.file.Path, java.util.List

Creates Java runtime.

Method Summary

Modifier and TypeMethod and Description
public void
create(AppImageLayout
the app image where to create Java runtime.
appImageLayout
)

Creates Java runtime in the given app image.

public static List<Path>

Returns:

the default set of paths where to find Java modules
getDefaultModulePath
()

Gets the default set of paths where jlink should look up for system Java modules.

public default boolean

Returns:

true if "--strip-native-commands" was not used with jlink
withNativeCommands
()

Returns true if "--strip-native-commands" was not used with jlink.

Method Detail

createback to summary
public void create(AppImageLayout appImageLayout)

Creates Java runtime in the given app image.

Implementation Note

Java runtime should be created in the directory returned by AppImageLayout#runtimeDirectory() method called on the given app image layout object.

Parameters
appImageLayout:AppImageLayout

the app image where to create Java runtime.

Exceptions
JPackageException:
if packaging error occurs
getDefaultModulePathback to summary
public 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:List<Path>

the default set of paths where to find Java modules

withNativeCommandsback to summary
public default boolean withNativeCommands()

Returns true if "--strip-native-commands" was not used with jlink. Default implementation returns false.

Returns:boolean

true if "--strip-native-commands" was not used with jlink