{"record":{"id":"47a15dae0e5a95b3","repo":"oracle/graal","slug":"could-not-run-command-s","errorCode":null,"errorMessage":"Could not run command: %s","messagePattern":"Could not run command: (.+?)","errorType":"panic","errorClass":"GraalError","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java","lineNumber":94,"sourceCode":"     */\n    private Path configFilePath;\n\n    int lineNo;\n\n    private GetJNIConfig(ClassLoader loader, Path libgraalJavaHome) {\n        this.loader = loader;\n        Path javaExe = getJavaExe(libgraalJavaHome);\n        configFilePath = Path.of(\"libgraal_jniconfig.txt\");\n\n        String[] command = {javaExe.toFile().getAbsolutePath(), \"-XX:+UnlockExperimentalVMOptions\", \"-XX:+EnableJVMCI\", \"-XX:JVMCILibDumpJNIConfig=\" + configFilePath};\n        quotedCommand = Stream.of(command).map(e -> e.indexOf(' ') == -1 ? e : '\\'' + e + '\\'').collect(Collectors.joining(\" \"));\n        ProcessBuilder pb = new ProcessBuilder(command);\n        pb.redirectErrorStream(true);\n        Process p;\n        try {\n            p = pb.start();\n        } catch (IOException e) {\n            throw new GraalError(e, \"Could not run command: %s\", quotedCommand);\n        }\n\n        String nl = System.lineSeparator();\n        String out = new BufferedReader(new InputStreamReader(p.getInputStream())).lines().collect(Collectors.joining(nl));\n\n        int exitValue;\n        try {\n            exitValue = p.waitFor();\n        } catch (InterruptedException e) {\n            throw new GraalError(e, \"Interrupted waiting for command: %s%n%s\", quotedCommand, out);\n        }\n        if (exitValue != 0) {\n            throw new GraalError(\"Command finished with exit value %d: %s%n%s\", exitValue, quotedCommand, out);\n        }\n        try {\n            lines = Files.readAllLines(configFilePath);\n        } catch (IOException e) {\n            Path cfp = configFilePath;","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java#L76-L112","documentation":"Error \"Could not run command: %s\" thrown in oracle/graal.","triggerScenarios":"Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java:94 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Could not run command: {}","solutions":["Fix the condition reported by the error: Could not run command: {}","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: Could not run command: {}","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-15T17:31:12.345Z"}