{"record":{"id":"e32815cdf09e5b5f","repo":"oracle/graal","slug":"command-finished-with-exit-value-d-s","errorCode":null,"errorMessage":"Command finished with exit value %d: %s","messagePattern":"Command finished with exit value (.+?): (.+?)","errorType":"panic","errorClass":"GraalError","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java","lineNumber":89,"sourceCode":"     * @param javaExe java executable\n     * @param module name of the module to test\n     */\n    private static boolean isInBootLayer(Path javaExe, String module) {\n        String search = \"jrt:/\" + module;\n        String[] command = {javaExe.toString(), \"--show-module-resolution\", \"--version\"};\n        try {\n            Process p = new ProcessBuilder(command).start();\n            BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n            String line;\n            boolean found = false;\n            while ((line = reader.readLine()) != null) {\n                if (line.contains(search)) {\n                    found = true;\n                }\n            }\n            int exitValue = p.waitFor();\n            if (exitValue != 0) {\n                throw new GraalError(\"Command finished with exit value %d: %s\", exitValue, String.join(\" \", command));\n            }\n            return found;\n        } catch (Exception e) {\n            throw new GraalError(e, \"Error running command: %s\", String.join(\" \", command));\n        }\n    }\n\n    /**\n     * Launches the JVM in {@code javaHome} to run {@link CompilerConfig}.\n     *\n     * @param javaHome the value of the {@code java.home} system property reported by a Java\n     *            installation directory that includes the Graal classes in its runtime image\n     */\n    public static Result from(Path javaHome) {\n        Path javaExe = GetJNIConfig.getJavaExe(javaHome);\n        Map<String, Set<String>> opens = CollectionsUtil.mapOf(\n                        // Needed to reflect fields like\n                        // java.util.ImmutableCollections.EMPTY","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java#L71-L107","documentation":"Error \"Command finished with exit value %d: %s\" thrown in oracle/graal.","triggerScenarios":"Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetCompilerConfig.java:89 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Command finished with exit value {}: {}","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."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Command finished with exit value {}: {}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}