{"record":{"id":"7be6ab9a036b6f5b","repo":"alibaba/arthas","slug":"illegal-arthas-home-arthashome","errorCode":null,"errorMessage":"illegal arthas home: {arthasHome}","messagePattern":"illegal arthas home: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java","lineNumber":759,"sourceCode":"        }\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() {\n        return arthasHome;\n    }\n\n    public String getUseVersion() {\n        return useVersion;\n    }\n","sourceCodeStart":741,"sourceCodeEnd":777,"githubUrl":"https://github.com/alibaba/arthas/blob/21cf2e9ba52b305290be7223b980ff504bb9cb5b/boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java#L741-L777","documentation":"Bootstrap.verifyArthasHome throws IllegalArgumentException(\"illegal arthas home: <path>\") when the supplied arthasHome does not resolve to a directory at all (File.isDirectory() is false) — i.e. it is a file, or it does not exist. This is the fallback reached before the per-jar checks run.","triggerScenarios":"Thrown at boot/src/main/java/com/taobao/arthas/boot/Bootstrap.java:759 when the library encounters an invalid state.","commonSituations":"Typo in --arthas-home; pointing at a zip/tar instead of the extracted directory; relative path resolved against an unexpected working directory; missing install dir on a fresh/containerized environment.","solutions":["Confirm the path exists and is a directory (ls -ld <path>).","Use an absolute path for --arthas-home to avoid working-directory ambiguity.","Extract the distribution archive fully before pointing at it.","Reinstall Arthas to a known-good directory."],"exampleFix":"# before\njava -jar arthas-boot.jar --arthas-home ./arthas-bin.zip\n\n# after\nunzip arthas-bin.zip -d /opt/arthas\njava -jar arthas-boot.jar --arthas-home /opt/arthas","handlingStrategy":"validation","validationCode":"File home = new File(arthasHome);\nif (!home.isDirectory()) {\n    throw new IllegalStateException(\"not a directory: \" + home);\n}","typeGuard":"static boolean isDirectoryHome(String path) {\n    return path != null && new File(path).isDirectory();\n}","tryCatchPattern":"try {\n    Bootstrap.verifyArthasHome(home);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"illegal arthas home\")) {\n        // repoint to a real directory\n    } else throw e;\n}","preventionTips":["Use absolute paths for --arthas-home.","Confirm the directory exists (ls -ld) before launching.","Extract archives fully; never point at the archive file itself."],"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"}