{"record":{"id":"3cc787633c55fbba","repo":"HMCL-dev/HMCL","slug":"game-processor-dependency-missing","errorCode":null,"errorMessage":"Game processor dependency missing","messagePattern":"Game processor dependency missing","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"HMCLCore/src/main/java/org/jackhuang/hmcl/download/forge/ForgeNewInstallTask.java","lineNumber":132,"sourceCode":"                throw new FileNotFoundException(\"Game processor file not found, should be downloaded in preprocess\");\n\n            String mainClass;\n            try (JarFile jarFile = new JarFile(jar.toFile())) {\n                mainClass = jarFile.getManifest().getMainAttributes().getValue(Attributes.Name.MAIN_CLASS);\n            }\n\n            if (StringUtils.isBlank(mainClass))\n                throw new Exception(\"Game processor jar does not have main class \" + jar);\n\n            List<String> command = new ArrayList<>();\n            command.add(JavaRuntime.getDefault().getBinary().toString());\n            command.add(\"-cp\");\n\n            List<String> classpath = new ArrayList<>(processor.getClasspath().size() + 1);\n            for (Artifact artifact : processor.getClasspath()) {\n                Path file = gameRepository.getLayout().getArtifactFile(artifact);\n                if (!Files.isRegularFile(file))\n                    throw new Exception(\"Game processor dependency missing\");\n                classpath.add(file.toString());\n            }\n            classpath.add(jar.toString());\n            command.add(String.join(File.pathSeparator, classpath));\n\n            command.add(mainClass);\n\n            List<String> args = new ArrayList<>(processor.getArgs().size());\n            for (String arg : processor.getArgs()) {\n                String parsed = parseLiteral(arg, vars);\n                if (parsed == null)\n                    throw new ArtifactMalformedException(\"Invalid forge installation configuration\");\n                args.add(parsed);\n            }\n\n            command.addAll(args);\n\n            LOG.info(\"Executing external processor \" + processor.getJar().toString() + \", command line: \" + new CommandBuilder().addAll(command).toString());","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/HMCL-dev/HMCL/blob/24702dc5a0214034f4c27166d5fd30cad08cec19/HMCLCore/src/main/java/org/jackhuang/hmcl/download/forge/ForgeNewInstallTask.java#L114-L150","documentation":"Thrown when a JAR listed in the processor's classpath is not a regular file in the game repository. Forge processors run with a classpath of several libraries; if any one is missing, HMCL aborts before launching the processor since the processor would fail anyway.","triggerScenarios":"During ProcessorTask.execute(), any Artifact in processor.getClasspath() resolves via gameRepository.getLayout().getArtifactFile() to a nonexistent or non-regular path — i.e. the preprocess library download did not fetch that library.","commonSituations":"Incomplete libraries directory after an interrupted install; manually deleted libraries to 'clean up' disk; repository relocation; a library that failed SHA checks and was removed.","solutions":["Re-run the Forge installation so GameLibrariesTask re-downloads all processor classpath libraries","Identify the missing library from logs/paths and restore or download it into the libraries directory","Ensure the game repository base directory is the same one used when the libraries were downloaded","Clear partial downloads and retry on a stable network connection"],"exampleFix":"// before: skipping the libraries download step\nprocessorTask.run();\n// after: run the full ForgeNewInstallTask whose dependents fetch libraries first\nnew ForgeNewInstallTask(dependencyManager, manifest, minecraftJar, version, installer).run();","handlingStrategy":"try-catch","validationCode":"// Pre-check every classpath artifact resolves\nfor (Artifact a : processor.getClasspath()) {\n    Path f = gameRepository.getLayout().getArtifactFile(a);\n    if (!Files.isRegularFile(f)) throw new IOException(\"Missing library before install: \" + f);\n}","typeGuard":null,"tryCatchPattern":"try {\n    installTask.run();\n} catch (Exception e) {\n    if (\"Game processor dependency missing\".equals(e.getMessage())) {\n        // re-run GameLibrariesTask / dependency downloads, then retry install\n    }\n}","preventionTips":["Run the complete install task so dependent library downloads always precede processors","Keep the game repository in one stable location across sessions","Restore deleted libraries by re-running version/component completion checks"],"tags":["forge","classpath","missing-library"],"backgroundTag":"missing-dependency","analyzedSha":"24702dc5a0214034f4c27166d5fd30cad08cec19","analyzedAt":"2026-09-10T12:36:46.680Z","contentChangedAt":"2026-09-10T12:36:46.680Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}