{"record":{"id":"a0a1d9b573882e9f","repo":"oracle/graal","slug":"the-java-home-system-property-is-not-set","errorCode":null,"errorMessage":"The java.home system property is not set","messagePattern":"The java\\.home system property is not set","errorType":"exception","errorClass":"AssertionError","httpStatus":null,"severity":"error","filePath":"sdk/src/org.graalvm.home/src/org/graalvm/home/impl/DefaultHomeFinder.java","lineNumber":183,"sourceCode":"\n        final Path home;\n        if (ImageInfo.inImageRuntimeCode()) {\n            final String graalvmHomeValue = System.getProperty(\"org.graalvm.home\");\n            if (graalvmHomeValue != null) {\n                verbose(\"GraalVM home already set to: \", graalvmHomeValue);\n                home = Paths.get(graalvmHomeValue);\n            } else {\n                home = getGraalVmHomeNative();\n                verbose(\"Found GraalVM home: \", home);\n                if (home == null) {\n                    return null;\n                }\n            }\n            return home;\n        } else {\n            final String javaHomeProperty = System.getProperty(\"java.home\");\n            if (javaHomeProperty == null) {\n                throw new AssertionError(\"The java.home system property is not set\");\n            }\n\n            final Path javaHome = Paths.get(javaHomeProperty);\n            if (!Files.exists(javaHome)) {\n                throw new AssertionError(\"Java home is not reachable.\");\n            }\n\n            if (Files.exists(javaHome.resolve(Paths.get(\"lib\", \"modules\")))) {\n                home = javaHome;\n            } else {\n                throw new AssertionError(\"Missing jimage in java.home: \" + javaHome);\n            }\n\n            verbose(\"GraalVM home found by java.home property as: \", home);\n            return home;\n        }\n    }\n","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/src/org.graalvm.home/src/org/graalvm/home/impl/DefaultHomeFinder.java#L165-L201","documentation":"Error \"The java.home system property is not set\" thrown in oracle/graal.","triggerScenarios":"Thrown at sdk/src/org.graalvm.home/src/org/graalvm/home/impl/DefaultHomeFinder.java:183 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: The java.home system property is not set","solutions":["Fix the condition reported by the error: The java.home system property is not set","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: The java.home system property is not set","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"}