{"record":{"id":"08a3e5104242abed","repo":"oracle/graal","slug":"include-res-i-does-not-exist","errorCode":null,"errorMessage":"Include: <res[i]> does not exist.","messagePattern":"Include: <res\\[i\\]> does not exist\\.","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java","lineNumber":1129,"sourceCode":"            Path javaHome = Paths.get(System.getProperty(\"java.home\"));\n            Path includeFolder = javaHome.resolve(\"include\");\n            if (!Files.exists(includeFolder)) {\n                Path parent = javaHome.getParent();\n                if (parent != null) {\n                    javaHome = parent;\n                }\n            }\n            includeFolder = javaHome.resolve(\"include\");\n            if (!Files.exists(includeFolder)) {\n                throw new IllegalStateException(\"Cannot find 'include' folder in JDK.\");\n            }\n            Path[] res = new Path[INCLUDES.length];\n            try {\n                for (int i = 0; i < INCLUDES.length; i++) {\n                    String include = INCLUDES[i];\n                    Optional<Path> includeFile = Files.find(includeFolder, 2, (p, attrs) -> include.equals(p.getFileName().toString())).findFirst();\n                    if (!includeFile.isPresent()) {\n                        throw new IllegalStateException(\"Include: \" + res[i] + \" does not exist.\");\n                    }\n                    res[i] = includeFile.get();\n                }\n                return res;\n            } catch (IOException ioe) {\n                throw new RuntimeException(ioe);\n            }\n        }\n    }\n}\n","sourceCodeStart":1111,"sourceCodeEnd":1140,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java#L1111-L1140","documentation":"Error \"Include: <res[i]> does not exist.\" thrown in oracle/graal.","triggerScenarios":"Thrown at sdk/src/org.graalvm.jniutils/src/org/graalvm/jniutils/JNI.java:1129 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Include: <res[i]> does not exist.","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."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Include: <res[i]> does not exist.","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"}