public class NativeImageGeneratorRunner extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NativeImageGeneratorRunner.JDK9Plus
Command line entry point when running on JDK9+.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
IMAGE_BUILDER_ARG_FILE_OPTION |
| Constructor and Description |
|---|
NativeImageGeneratorRunner() |
| Modifier and Type | Method and Description |
|---|---|
int |
build(ImageClassLoader imageClassLoader) |
static List<String> |
extractDriverArguments(List<String> args) |
static String[] |
extractImagePathEntries(List<String> arguments,
String pathPrefix) |
static int |
extractWatchPID(List<String> arguments) |
static String |
getJavaVersion() |
static ImageClassLoader |
installNativeImageClassLoader(String[] classpath,
String[] modulepath,
List<String> arguments)
Installs a class loader hierarchy that resolves classes and resources available in
classpath and modulepath. |
static boolean |
isValidJavaVersion()
Unless the check should be ignored, check that I am running on JDK-8.
|
static void |
main(String[] args) |
protected static void |
reportFatalError(Throwable e)
Reports an unexpected error caused by a crash in the SVM image builder.
|
protected static void |
reportFatalError(Throwable e,
String msg)
Reports an unexpected error caused by a crash in the SVM image builder.
|
static void |
reportUserError(String msg)
Function for reporting all fatal errors in SVM.
|
static void |
reportUserError(Throwable e,
org.graalvm.compiler.options.OptionValues parsedHostedOptions)
Function for reporting all fatal errors in SVM.
|
static void |
uninstallNativeImageClassLoader() |
static boolean |
verifyValidJavaVersionAndPlatform() |
public static final String IMAGE_BUILDER_ARG_FILE_OPTION
public static void main(String[] args)
public static void uninstallNativeImageClassLoader()
public static ImageClassLoader installNativeImageClassLoader(String[] classpath, String[] modulepath, List<String> arguments)
classpath and modulepath. The parent for the installed ClassLoader is
the default system class loader (jdk.internal.loader.ClassLoaders.AppClassLoader and
sun.misc.Launcher.AppClassLoader for JDK11, 8 respectively).
We use a custom system class loader NativeImageSystemClassLoader that delegates to
the ClassLoader that NativeImageClassLoaderSupport creates, thus allowing the
resolution of classes in classpath and modulepath via system class loader.classpath - for the application and image should be built for.modulepath - for the application and image should be built for (only for Java >= 11).arguments - ClassLoader for image building
via AbstractNativeImageClassLoaderSupport.getClassLoader().public static String[] extractImagePathEntries(List<String> arguments, String pathPrefix)
public static boolean isValidJavaVersion()
public static boolean verifyValidJavaVersionAndPlatform()
public static String getJavaVersion()
protected static void reportFatalError(Throwable e)
e - error to be reported.protected static void reportFatalError(Throwable e, String msg)
e - error to be reported.msg - message to report.public static void reportUserError(String msg)
msg - error message that is printed.public static void reportUserError(Throwable e, org.graalvm.compiler.options.OptionValues parsedHostedOptions)
e - error message that is printed.parsedHostedOptions - public int build(ImageClassLoader imageClassLoader)