oracle/graal · error · GraalError
Command finished with exit value %d: %s
Error message
Command finished with exit value %d: %s
What it means
Error "Command finished with exit value %d: %s" thrown in oracle/graal.
Source
Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java:89
* @param javaExe java executable
* @param module name of the module to test
*/
private static boolean isInBootLayer(Path javaExe, String module) {
String search = "jrt:/" + module;
String[] command = {javaExe.toString(), "--show-module-resolution", "--version"};
try {
Process p = new ProcessBuilder(command).start();
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
boolean found = false;
while ((line = reader.readLine()) != null) {
if (line.contains(search)) {
found = true;
}
}
int exitValue = p.waitFor();
if (exitValue != 0) {
throw new GraalError("Command finished with exit value %d: %s", exitValue, String.join(" ", command));
}
return found;
} catch (Exception e) {
throw new GraalError(e, "Error running command: %s", String.join(" ", command));
}
}
/**
* Launches the JVM in {@code javaHome} to run {@link CompilerConfig}.
*
* @param javaHome the value of the {@code java.home} system property reported by a Java
* installation directory that includes the Graal classes in its runtime image
*/
public static Result from(Path javaHome) {
Path javaExe = GetJNIConfig.getJavaExe(javaHome);
Map<String, Set<String>> opens = CollectionsUtil.mapOf(
// Needed to reflect fields like
// java.util.ImmutableCollections.EMPTYView on GitHub (pinned to a66e9ccd1d)
Solutions
- Fix the condition reported by the error: Command finished with exit value {}: {}
- Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call.
Example fix
Validate inputs and environment so that the failing condition does not occur: Command finished with exit value {}: {} When it happens
Trigger: Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java:89 when the library encounters an invalid state.
Common situations: Occurs when a caller violates the contract guarded by this check: Command finished with exit value {}: {}
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/e32815cdf09e5b5f.
Report an issue: GitHub.