{"record":{"id":"b0a6d5709d48817c","repo":"pxb1988/dex2jar","slug":"no-jar","errorCode":null,"errorMessage":"no jar","messagePattern":"no jar","errorType":"exception","errorClass":"HelpException","httpStatus":null,"severity":"error","filePath":"dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarWeaverCmd.java","lineNumber":23,"sourceCode":"import java.io.File;\nimport java.io.IOException;\nimport java.nio.file.FileSystem;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\n\n@BaseCmd.Syntax(cmd = \"d2j-jar-weaver\", syntax = \"[options] jar\", desc = \"replace invoke in jar\", onlineHelp = \"https://sourceforge.net/p/dex2jar/wiki/JarWeaver\")\npublic class JarWeaverCmd extends BaseCmd {\n    @Opt(opt = \"o\", longOpt = \"output\", description = \"output .jar file\", argName = \"out-jar-file\", required = true)\n    private Path output;\n    @Opt(opt = \"c\", longOpt = \"config\", description = \"config file\", argName = \"config\", required = true)\n    private Path config;\n    @Opt(opt = \"s\", longOpt = \"stub-jar\", description = \"stub jar\", argName = \"stub\")\n    private Path stub;\n\n    @Override\n    protected void doCommandLine() throws Exception {\n        if (remainingArgs.length == 0) {\n            throw new HelpException(\"no jar\");\n        }\n\n        InvocationWeaver invocationWeaver = (InvocationWeaver) new InvocationWeaver().withConfig(config);\n\n        try (FileSystem fs = createZip(output)) {\n            final Path outRoot = fs.getPath(\"/\");\n            for (String str : remainingArgs) {\n                Path p = new File(str).toPath();\n                System.err.println(p + \" -> \" + output);\n                if (Files.isDirectory(p)) {\n                    invocationWeaver.wave(p, outRoot);\n                } else {\n                    try (FileSystem fs2 = openZip(p)) {\n                        invocationWeaver.wave(fs2.getPath(\"/\"), outRoot);\n                    }\n                }\n            }\n            if (stub != null) {","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/pxb1988/dex2jar/blob/b5bda4fb4935ae8b3869b422454ae3b3896c7bc1/dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarWeaverCmd.java#L5-L41","documentation":"Usage guard in JarWeaverCmd.doCommandLine: no positional jar file argument was supplied. The command's syntax is '[options] jar', so with zero remaining args — even if the required -o and -c options were given — it throws this HelpException before opening any file.","triggerScenarios":"Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/JarWeaverCmd.java:23 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run d2j-jar-weaver with the input jar path as the last argument, e.g. d2j-jar-weaver -o out.jar -c config.txt in.jar","Run with -h to confirm the required options and syntax"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b5bda4fb4935ae8b3869b422454ae3b3896c7bc1","analyzedAt":"2026-09-08T00:44:01.258Z","contentChangedAt":"2026-09-08T00:44:01.258Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}