{"record":{"id":"d4456e6a52dfb030","repo":"openjdk/jdk","slug":"no-found-in-the-full-path-of-the-executable-d4456e","errorCode":null,"errorMessage":"no '\\' found in the full path of the executable\n","messagePattern":"no '\\\\' found in the full path of the executable\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/java.base/windows/native/launcher/relauncher.c","lineNumber":126,"sourceCode":"    if (our_full_path_len == 0) {\n        fprintf(stderr, \"failed to get the full path of the executable: %lu\\n\", GetLastError());\n        return 1;\n    }\n\n    char* our_full_path = malloc(our_full_path_len + 1);\n    if (our_full_path == NULL) {\n        perror(\"malloc failed\");\n        return 1;\n    }\n\n    if (GetFullPathName(argv[0], our_full_path_len + 1, our_full_path, NULL) == 0) {\n        fprintf(stderr, \"failed to get the full path of the executable: %lu\\n\", GetLastError());\n        return 1;\n    }\n\n    char *last_slash_pos = strrchr(our_full_path, '\\\\');\n    if (last_slash_pos == NULL) {\n        fprintf(stderr, \"no '\\\\' found in the full path of the executable\\n\");\n        return 1;\n    }\n\n    size_t base_length = last_slash_pos - our_full_path + 1;\n    size_t java_path_length = base_length + strlen(JAVA_EXECUTABLE_NAME) + 1;\n\n    char *java_path = malloc(java_path_length);\n    if (java_path == NULL) {\n        perror(\"malloc failed\");\n        return 1;\n    }\n\n    memcpy(java_path, our_full_path, base_length);\n    strcpy(java_path + base_length, JAVA_EXECUTABLE_NAME);\n\n    ////////////////////////////////////////////////////////////////////////////\n    // Build the argument list: our executable name + launcher args + users args\n","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/openjdk/jdk/blob/88dfb74bbeefcf2b0aa11835183bcd949998fc8f/src/java.base/windows/native/launcher/relauncher.c#L108-L144","documentation":"Windows launcher relauncher: after resolving the executable's full path, strrchr(path, '\\\\') returned NULL — the canonical full path contains no backslash, so the launcher cannot compute the directory prefix to append JAVA_EXECUTABLE_NAME ('java'). It prints the message and exits 1. GetFullPathName always returns a drive-absolute path containing at least one backslash, so in practice this is a defensive check that fires only on degenerate results.","triggerScenarios":"GetFullPathName returning a malformed result (e.g. a device path or empty string due to a filesystem filter or emulation layer), or memory corruption of the buffer — the normal Windows API contract makes a backslash-free full path essentially impossible.","commonSituations":"Exotic environments: Windows Subsystem/compatibility shims, Wine or other emulators with imperfect GetFullPathName, corrupted process memory from injected DLLs (hooking/overlay software), or a truncated buffer.","solutions":["Run java.exe in a clean environment (disable DLL injectors, overlays, screen recorders, compatibility shims) and retry","Verify the same JDK image works on an unmodified Windows host to rule out the image itself","Reinstall the JDK if the binary may be corrupted","Report to the emulator/hooking vendor if this only happens under their environment"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run java.exe on genuine Windows filesystems; avoid emulators/hooking frameworks that alter Win32 path APIs","Verify the JDK image checksums if the binary is suspected corrupted"],"tags":["jdk","launcher","windows","relauncher","environment"],"backgroundTag":null,"analyzedSha":"88dfb74bbeefcf2b0aa11835183bcd949998fc8f","analyzedAt":"2026-08-14T11:45:09.665Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}