oracle/graal · error · GraalError

Could not delete %s

Error message

Could not delete %s

What it means

Error "Could not delete %s" thrown in oracle/graal.

Source

Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java:134

    }

    static Path getJavaExe(Path javaHome) {
        boolean isWindows = GraalServices.getSavedProperty("os.name").contains("Windows");
        Path javaExe = javaHome.resolve(Path.of("bin", isWindows ? "java.exe" : "java"));
        if (!Files.isExecutable(javaExe)) {
            throw new GraalError("Java launcher %s does not exist or is not executable", javaExe);
        }
        return javaExe;
    }

    @Override
    public void close() {
        if (configFilePath != null && Files.exists(configFilePath)) {
            try {
                Files.delete(configFilePath);
                configFilePath = null;
            } catch (IOException e) {
                throw new GraalError(e, "Could not delete %s", configFilePath);
            }
        }
    }

    public static Class<?> forPrimitive(String name) {
        return switch (name) {
            case "Z", "boolean" -> boolean.class;
            case "C", "char" -> char.class;
            case "F", "float" -> float.class;
            case "D", "double" -> double.class;
            case "B", "byte" -> byte.class;
            case "S", "short" -> short.class;
            case "I", "int" -> int.class;
            case "J", "long" -> long.class;
            case "V", "void" -> void.class;
            default -> null;
        };
    }

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Fix the condition reported by the error: Could not delete {}
  2. 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: Could not delete {}

When it happens

Trigger: Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/GetJNIConfig.java:134 when the library encounters an invalid state.

Common situations: Occurs when a caller violates the contract guarded by this check: Could not delete {}


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/3837f3c8f8c0f38e. Report an issue: GitHub.