{"record":{"id":"948348f7bfd33327","repo":"HMCL-dev/HMCL","slug":"this-method-should-not-be-called-please-verify-th","errorCode":null,"errorMessage":"This method should not be called, please verify that the HMCL is complete.","messagePattern":"This method should not be called, please verify that the HMCL is complete\\.","errorType":"exception","errorClass":"AssertionError","httpStatus":null,"severity":"critical","filePath":"HMCLBoot/src/main/java/org/jackhuang/hmcl/EntryPoint.java","lineNumber":28,"sourceCode":" * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program.  If not, see <https://www.gnu.org/licenses/>.\n */\npackage org.jackhuang.hmcl;\n\n/**\n * This is a dummy class and will be overwritten in the shadow jar.\n */\npublic final class EntryPoint {\n    private EntryPoint() {\n    }\n\n    public static void main(String[] args) {\n        throw new AssertionError(\"This method should not be called, please verify that the HMCL is complete.\");\n    }\n}\n","sourceCodeStart":10,"sourceCodeEnd":31,"githubUrl":"https://github.com/HMCL-dev/HMCL/blob/24702dc5a0214034f4c27166d5fd30cad08cec19/HMCLBoot/src/main/java/org/jackhuang/hmcl/EntryPoint.java#L10-L31","documentation":"HMCLBoot's EntryPoint is a bootstrap entry point that must never be invoked directly; the real launcher rewrites/replaces it during startup. If main is ever reached, it unconditionally throws an AssertionError telling the user the HMCL installation is likely incomplete or broken.","triggerScenarios":"Running java -jar HMCL.jar (or -cp) with org.jackhuang.hmcl.boot.EntryPoint (HMCLBoot module) as the main class, so the placeholder main executes instead of the real HMCL entry point.","commonSituations":"A corrupted or partially extracted HMCL JAR where the launcher stub was not replaced; manually launching the wrong class; a packaging bug where HMCLBoot's manifest main-class leaked into the distribution.","solutions":["Re-download / reinstall the complete official HMCL JAR — the installation is likely incomplete","Launch the correct main class (the HMCL application entry point, not the boot stub)","Verify the JAR's manifest Main-Class and that the fat JAR contains the full application","Rebuild the distribution with the proper bundling step if building from source"],"exampleFix":"// before\njava -cp HMCL.jar org.jackhuang.hmcl.boot.EntryPoint\n// after\njava -jar HMCL.jar  # uses the correct Main-Class of the complete distribution","handlingStrategy":"validation","validationCode":"Class<?> mainClass = Class.forName(manifestMainClass);\nif (mainClass.getName().equals(\"org.jackhuang.hmcl.boot.EntryPoint\")) {\n    throw new IllegalStateException(\"Installation incomplete: boot stub is the main class\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    launchHmcl();\n} catch (AssertionError e) {\n    if (e.getMessage().contains(\"HMCL is complete\")) {\n        LOG.severe(\"Broken HMCL installation; reinstall the full official jar\", e);\n    }\n}","preventionTips":["Never launch the HMCLBoot EntryPoint directly; use the distribution's Main-Class","Reinstall the complete official JAR rather than partially extracting it","Validate the distribution manifest Main-Class when packaging HMCL yourself"],"tags":["bootstrap","assertion","installation"],"backgroundTag":"internal-invariant-violation","analyzedSha":"24702dc5a0214034f4c27166d5fd30cad08cec19","analyzedAt":"2026-09-10T12:36:46.680Z","contentChangedAt":"2026-09-10T12:36:46.680Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}