{"record":{"id":"8e8cdb93c7748cfd","repo":"alibaba/arthas","slug":"filename-do-not-exist-arthas-home-arthashome","errorCode":null,"errorMessage":"{fileName} do not exist, arthas home: {arthasHome}","messagePattern":"(.+?) do not exist, arthas home: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java","lineNumber":752,"sourceCode":"        }\n        for (File file : files) {\n            String name = file.getName();\n            if (name.startsWith(\".\") || file.isFile()) {\n                continue;\n            }\n            names.add(name);\n        }\n        return names;\n    }\n\n    private static void verifyArthasHome(String arthasHome) {\n        File home = new File(arthasHome);\n        if (home.isDirectory()) {\n            String[] fileList = { \"arthas-core.jar\", \"arthas-agent.jar\", \"arthas-spy.jar\" };\n\n            for (String fileName : fileList) {\n                if (!new File(home, fileName).exists()) {\n                    throw new IllegalArgumentException(\n                                    fileName + \" do not exist, arthas home: \" + home.getAbsolutePath());\n                }\n            }\n            return;\n        }\n\n        throw new IllegalArgumentException(\"illegal arthas home: \" + home.getAbsolutePath());\n    }\n\n    private static String usage(CLI cli) {\n        StringBuilder usageStringBuilder = new StringBuilder();\n        UsageMessageFormatter usageMessageFormatter = new UsageMessageFormatter();\n        usageMessageFormatter.setOptionComparator(null);\n        cli.usage(usageStringBuilder, usageMessageFormatter);\n        return UsageRender.render(usageStringBuilder.toString());\n    }\n\n    public String getArthasHome() {","sourceCodeStart":734,"sourceCodeEnd":770,"githubUrl":"https://github.com/alibaba/arthas/blob/21cf2e9ba52b305290be7223b980ff504bb9cb5b/boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java#L734-L770","documentation":"Bootstrap.verifyArthasHome treats its argument as a candidate installation directory. When the path IS a directory, it checks for three required jars — arthas-core.jar, arthas-agent.jar, arthas-spy.jar. If any is missing it throws IllegalArgumentException naming the missing file and the home path.","triggerScenarios":"Running arthas-boot with --use-version or --arthas-home pointing at an incomplete/partial Arthas install where one of the three core jars is absent (e.g. interrupted download, custom build missing spy jar).","commonSituations":"Corrupted or partial extraction of the arthas distribution; pointing --arthas-home at a source checkout instead of an assembled lib dir; version mismatch where an older layout is missing a jar; permissions hiding a jar from File.exists().","solutions":["Re-download/reinstall the matching Arthas version so the home dir contains all three jars.","Point --arthas-home at the directory that actually holds arthas-core.jar, arthas-agent.jar, arthas-spy.jar.","If building from source, run the full assemble/package step so all jars are produced.","Verify file permissions allow listing/reading the jars."],"exampleFix":"# before\njava -jar arthas-boot.jar --arthas-home /opt/arthas-src\n\n# after\njava -jar arthas-boot.jar --arthas-home /opt/arthas-lib   # contains the 3 jars","handlingStrategy":"validation","validationCode":"File home = new File(arthasHome);\nfor (String jar : new String[]{\"arthas-core.jar\",\"arthas-agent.jar\",\"arthas-spy.jar\"}) {\n    if (!new File(home, jar).isFile()) {\n        throw new IllegalStateException(\"arthas home incomplete, missing \" + jar);\n    }\n}","typeGuard":"static boolean isCompleteArthasHome(File home) {\n    if (home == null || !home.isDirectory()) return false;\n    for (String j : new String[]{\"arthas-core.jar\",\"arthas-agent.jar\",\"arthas-spy.jar\"}) {\n        if (!new File(home, j).isFile()) return false;\n    }\n    return true;\n}","tryCatchPattern":"try {\n    Bootstrap.verifyArthasHome(home);\n} catch (IllegalArgumentException e) {\n    logger.error(\"arthas home invalid: {}\", home, e);\n    // reinstall or repoint home\n}","preventionTips":["Verify the three required jars exist before launch.","Reinstall from a trusted distribution when a jar is missing.","Pin Arthas version and re-download on upgrade."],"tags":["boot","installation","filesystem","config"],"backgroundTag":null,"analyzedSha":"21cf2e9ba52b305290be7223b980ff504bb9cb5b","analyzedAt":"2026-08-14T00:57:07.243Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}