oracle/graal · error · GraalError
Error running command: %s
Error message
Error running command: %s
What it means
Error "Error running command: %s" thrown in oracle/graal.
Source
Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java:93
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.EMPTY
"java.base", CollectionsUtil.setOf("java.util"));
// Only modules in the boot layer can be the target of --add-exports
String addExports = "--add-exports=java.base/jdk.internal.misc=jdk.graal.compiler";View on GitHub (pinned to a66e9ccd1d)
Solutions
- Fix the condition reported by the error: Error running command: {}
- 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: Error running command: {} When it happens
Trigger: Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java:93 when the library encounters an invalid state.
Common situations: Occurs when a caller violates the contract guarded by this check: Error running command: {}
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/cdfcb7c3ee234342.
Report an issue: GitHub.