public class NativeImageGeneratorRunner extends Object implements ImageBuildTask
| Modifier and Type | Class and Description |
|---|---|
static class |
NativeImageGeneratorRunner.JDK9Plus
Command line entry point when running on JDK9+.
|
| Constructor and Description |
|---|
NativeImageGeneratorRunner() |
| Modifier and Type | Method and Description |
|---|---|
int |
build(String[] args,
NativeImageClassLoader imageClassLoader)
Main function for remote image building which is invoked on every image building request sent
to the server.
|
static String[] |
extractImageClassPath(List<String> arguments) |
static int |
extractWatchPID(List<String> arguments) |
static String |
getJavaVersion() |
static NativeImageClassLoader |
installNativeImageClassLoader(String[] classpath)
Installs a class loader hierarchy that resolves classes and resources available in
classpath. |
void |
interruptBuild()
Requests interruption of the image build.
|
static boolean |
isValidJavaVersion()
Unless the check should be ignored, check that I am running on JDK-8.
|
static void |
main(String[] args) |
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 boolean |
verifyValidJavaVersionAndPlatform() |
public static void main(String[] args)
public static NativeImageClassLoader installNativeImageClassLoader(String[] classpath)
classpath. The parent for the installed NativeImageClassLoader is the default
system class loader (jdk.internal.loader.ClassLoaders.AppClassLoader and
sun.misc.Launcher.AppClassLoader for JDK8,11 respectively)
In the presence of the custom system class loader NativeImageSystemClassLoader the
delegate is to NativeImageClassLoader allowing the resolution of classes in
classpath via the system class loader. Note that any custom system class loader has
the default system class loader as its parentclasspath - public static boolean isValidJavaVersion()
public static boolean verifyValidJavaVersionAndPlatform()
public static String getJavaVersion()
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(String[] args, NativeImageClassLoader imageClassLoader)
ImageBuildTaskbuild finishes, the static state of the JDK
and NativeImageBuildServer must not have pointers to classes loaded by
compilationClassLoader.build in interface ImageBuildTaskargs - arguments passed with the request to the SVM image builderimageClassLoader - the classloader used for this image building taskNativeImageBuildServerpublic void interruptBuild()
ImageBuildTaskinterruptBuild in interface ImageBuildTask