{"record":{"id":"aab5c5013a0b487f","repo":"HMCL-dev/HMCL","slug":"minecraft-jar-does-not-exist","errorCode":null,"errorMessage":"Minecraft jar does not exist","messagePattern":"Minecraft jar does not exist","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"critical","filePath":"HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java","lineNumber":287,"sourceCode":"                && options.getJava().getArchitecture() == Architecture.SYSTEM_ARCH\n                && options.getRenderer() instanceof Renderer.Vulkan vulkanDriver\n                && vulkanDriver.icdFile() != null) {\n            if (Files.isRegularFile(HomebrewUtils.LIB_VULKAN)) {\n                res.addDefault(\"-Dorg.lwjgl.vulkan.libname=\", FileUtils.getAbsolutePath(HomebrewUtils.LIB_VULKAN));\n            }\n        }\n\n        // Library classpath used both for -cp and for rewriting old BootstrapLauncher ignore lists.\n        Set<String> libraryClasspath = getClasspath();\n\n        if (instance.hasComponent(GameComponentType.CLEANROOM)) {\n            libraryClasspath.removeIf(c -> c.contains(\"2.9.4-nightly-20150209\"));\n            libraryClasspath.removeIf(c -> c.contains(\"platform-3.4.0\"));\n        }\n\n        Path jar = instance.getInstanceJarFile();\n        if (!Files.isRegularFile(jar))\n            throw new IOException(\"Minecraft jar does not exist\");\n        Set<String> classpath = new LinkedHashSet<>(libraryClasspath);\n        classpath.add(FileUtils.getAbsolutePath(jar));\n\n        // Provided Minecraft arguments\n        Path gameAssets = instance.getActualAssetDirectory(manifest.getAssetIndex().getId());\n        Map<String, String> configuration = getConfigurations();\n        configuration.put(\"${classpath}\", String.join(File.pathSeparator, classpath));\n        configuration.put(\"${game_assets}\", FileUtils.getAbsolutePath(gameAssets));\n        configuration.put(\"${assets_root}\", FileUtils.getAbsolutePath(gameAssets));\n\n        Optional<String> gameVersion = findGameVersion();\n\n        // lwjgl assumes path to native libraries encoded by ASCII.\n        // Here is a workaround for this issue: https://github.com/HMCL-dev/HMCL/issues/1141.\n        String nativeFolderPath = FileUtils.getAbsolutePath(nativeFolder);\n        Path tempNativeFolder = null;\n        if ((OperatingSystem.CURRENT_OS == OperatingSystem.LINUX || OperatingSystem.CURRENT_OS == OperatingSystem.MACOS)\n                && !StringUtils.isASCII(nativeFolderPath)","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/HMCL-dev/HMCL/blob/24702dc5a0214034f4c27166d5fd30cad08cec19/HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java#L269-L305","documentation":"DefaultLauncher.generateCommandLine builds the classpath for launching the game and requires the instance's Minecraft jar file to exist. It throws IOException(\"Minecraft jar does not exist\") when Files.isRegularFile(jar) is false for the jar resolved from instance.getInstanceJarFile(), because launching without the main game jar is impossible.","triggerScenarios":"Launching an instance (via command()/commandLine() -> generateCommandLine) where the instance's jar path points to a missing file — the jar was deleted, moved, or never downloaded/extracted from a modpack.","commonSituations":"Interrupted version download or modpack install; user manually deleted the .jar from the versions folder; renaming the version folder without updating the jar name; isolated/incomplete instance copied without the jar.","solutions":["Re-download the Minecraft version jar (let the launcher repair/reinstall the version).","Check the instance's jar path setting matches an existing file (version id and jar filename must match).","Reinstall or re-import the modpack/instance to restore missing files.","Verify file permissions/disk space so the jar can actually be present at that path."],"exampleFix":"// before: versions/1.20.1/ contains only 1.20.1.json\n// after: trigger version repair or place 1.20.1.jar in the same folder","handlingStrategy":"validation","validationCode":"Path jar = instance.getInstanceJarFile();\nif (jar == null || !Files.isRegularFile(jar)) {\n    // trigger version repair / re-download before launching\n}","typeGuard":null,"tryCatchPattern":"try {\n    launcher.launch();\n} catch (IOException e) {\n    if (e.getMessage().contains(\"Minecraft jar does not exist\")) {\n        // repair: re-download the version jar\n    }\n}","preventionTips":["Run the launcher's version repair after failed or interrupted installs","Do not manually delete or rename files inside the versions/ folder","When copying instances, copy the jar together with its version JSON"],"tags":["minecraft","launcher","missing-file","classpath"],"backgroundTag":"file-not-found","analyzedSha":"24702dc5a0214034f4c27166d5fd30cad08cec19","analyzedAt":"2026-09-10T12:36:46.680Z","contentChangedAt":"2026-09-10T12:36:46.680Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}