skylot/jadx · error · JadxArgsValidateException

Please specify input file

Error message

Please specify input file

What it means

An argument-validation error raised by JadxArgsValidator.checkInputFiles() before any decompilation starts. jadx requires at least one input file OR a custom code loader; if args.getInputFiles() is empty and jadx.getCustomCodeLoaders() is also empty, there is nothing to decompile and a JadxArgsValidateException (a RuntimeException) is thrown. This fires during JadxDecompiler initialization/save setup.

Source

Thrown at jadx-core/src/main/java/jadx/api/JadxArgsValidator.java:29

public class JadxArgsValidator {

	private static final Logger LOG = LoggerFactory.getLogger(JadxArgsValidator.class);

	public static void validate(JadxDecompiler jadx) {
		JadxArgs args = jadx.getArgs();
		checkInputFiles(jadx, args);
		validateOutDirs(args);

		if (LOG.isDebugEnabled()) {
			LOG.debug("Effective jadx args: {}", args);
		}
	}

	private static void checkInputFiles(JadxDecompiler jadx, JadxArgs args) {
		List<File> inputFiles = args.getInputFiles();
		if (inputFiles.isEmpty() && jadx.getCustomCodeLoaders().isEmpty()) {
			throw new JadxArgsValidateException("Please specify input file");
		}
		for (File file : inputFiles) {
			checkFile(file);
		}
	}

	private static void validateOutDirs(JadxArgs args) {
		File outDir = args.getOutDir();
		File srcDir = args.getOutDirSrc();
		File resDir = args.getOutDirRes();
		if (outDir == null) {
			if (srcDir != null) {
				outDir = srcDir;
			} else if (resDir != null) {
				outDir = resDir;
			} else {
				outDir = makeDirFromInput(args);
			}

View on GitHub (pinned to e738a26571)

Solutions

  1. Add at least one input file: args.setInputFiles(List.of(new File("app.apk"))).
  2. Alternatively, register a custom code loader via jadx.addCustomCodeLoader(...) if you supply classes programmatically.
  3. Validate args yourself before calling load() to give a clearer error.
  4. Check that the input-files list is populated and non-empty right before initialization.

Example fix

// before
JadxArgs args = new JadxArgs();
args.setOutDir(new File("out"));
JadxDecompiler d = new JadxDecompiler(args);
d.load();

// after
JadxArgs args = new JadxArgs();
args.setInputFiles(List.of(new File("app.apk")));
args.setOutDir(new File("out"));
JadxDecompiler d = new JadxDecompiler(args);
d.load();
Defensive patterns

Strategy: validation

Validate before calling

// Validate args before initializing jadx.
List<File> inputs = args.getInputFiles();
if ((inputs == null || inputs.isEmpty()) && customLoaders.isEmpty()) {
    throw new IllegalArgumentException("At least one input file or a custom code loader is required.");
}

Try / catch

try {
    decompiler.load();
} catch (JadxArgsValidateException e) {
    if (e.getMessage().contains("specify input file")) {
        // fix args and retry
        args.setInputFiles(List.of(apkFile));
        decompiler.load();
    } else throw e;
}

Prevention

When it happens

Trigger: Constructing JadxArgs without calling setInputFiles() (or setFiles()/setInput() with a path) and without registering any custom code loader, then calling decompiler.load() or save().

Common situations: Programmatic jadx usage where the caller forgot to set input files; a CLI wrapper that clears the args list on a config error; tests that build JadxArgs incrementally and miss the input step.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/433bda535c60aae7. Report an issue: GitHub.