oracle/graal · error · IllegalStateException
Include: <res[i]> does not exist.
Error message
Include: <res[i]> does not exist.
What it means
Error "Include: <res[i]> does not exist." thrown in oracle/graal.
Source
Thrown at sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java:1129
Path javaHome = Paths.get(System.getProperty("java.home"));
Path includeFolder = javaHome.resolve("include");
if (!Files.exists(includeFolder)) {
Path parent = javaHome.getParent();
if (parent != null) {
javaHome = parent;
}
}
includeFolder = javaHome.resolve("include");
if (!Files.exists(includeFolder)) {
throw new IllegalStateException("Cannot find 'include' folder in JDK.");
}
Path[] res = new Path[INCLUDES.length];
try {
for (int i = 0; i < INCLUDES.length; i++) {
String include = INCLUDES[i];
Optional<Path> includeFile = Files.find(includeFolder, 2, (p, attrs) -> include.equals(p.getFileName().toString())).findFirst();
if (!includeFile.isPresent()) {
throw new IllegalStateException("Include: " + res[i] + " does not exist.");
}
res[i] = includeFile.get();
}
return res;
} catch (IOException ioe) {
throw new RuntimeException(ioe);
}
}
}
}
View on GitHub (pinned to a66e9ccd1d)
Solutions
- Fix the condition reported by the error: Include: <res[i]> does not exist.
- 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: Include: <res[i]> does not exist.
When it happens
Trigger: Thrown at sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java:1129 when the library encounters an invalid state.
Common situations: Occurs when a caller violates the contract guarded by this check: Include: <res[i]> does not exist.
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/08a3e5104242abed.
Report an issue: GitHub.