{"record":{"id":"3837f3c8f8c0f38e","repo":"oracle/graal","slug":"could-not-delete-s","errorCode":null,"errorMessage":"Could not delete %s","messagePattern":"Could not delete (.+?)","errorType":"panic","errorClass":"GraalError","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java","lineNumber":134,"sourceCode":"    }\n\n    static Path getJavaExe(Path javaHome) {\n        boolean isWindows = GraalServices.getSavedProperty(\"os.name\").contains(\"Windows\");\n        Path javaExe = javaHome.resolve(Path.of(\"bin\", isWindows ? \"java.exe\" : \"java\"));\n        if (!Files.isExecutable(javaExe)) {\n            throw new GraalError(\"Java launcher %s does not exist or is not executable\", javaExe);\n        }\n        return javaExe;\n    }\n\n    @Override\n    public void close() {\n        if (configFilePath != null && Files.exists(configFilePath)) {\n            try {\n                Files.delete(configFilePath);\n                configFilePath = null;\n            } catch (IOException e) {\n                throw new GraalError(e, \"Could not delete %s\", configFilePath);\n            }\n        }\n    }\n\n    public static Class<?> forPrimitive(String name) {\n        return switch (name) {\n            case \"Z\", \"boolean\" -> boolean.class;\n            case \"C\", \"char\" -> char.class;\n            case \"F\", \"float\" -> float.class;\n            case \"D\", \"double\" -> double.class;\n            case \"B\", \"byte\" -> byte.class;\n            case \"S\", \"short\" -> short.class;\n            case \"I\", \"int\" -> int.class;\n            case \"J\", \"long\" -> long.class;\n            case \"V\", \"void\" -> void.class;\n            default -> null;\n        };\n    }","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java#L116-L152","documentation":"Error \"Could not delete %s\" thrown in oracle/graal.","triggerScenarios":"Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java:134 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Could not delete {}","solutions":["Fix the condition reported by the error: Could not delete {}","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 delete {}","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"}