skylot/jadx · error · FileNotFoundException

{}

Error message

{}

What it means

This file:line (ZipReader.open, the FileNotFoundException branch) is the source anchor, but the literal '{}' placeholder message corresponds to the FileNotFoundException thrown when zipFile.exists() is false: 'throw new FileNotFoundException(zipFile.getAbsolutePath())'. It fires before any parsing attempt when the input file does not exist on disk.

Solutions

  1. Verify the path exists with Files.exists before calling open.
  2. Use an absolute path to avoid working-directory ambiguity.
  3. Check spelling and case of the filename on case-sensitive OS.
  4. Confirm removable/network mounts are attached.

Example fix

// before
new ZipReader(security).open(new File("input.apk"));
// after
File f = new File("/abs/path/input.apk");
if (!f.exists()) throw new IllegalArgumentException("missing: " + f);
new ZipReader(security).open(f);
Defensive patterns

Strategy: validation

Validate before calling

File f = ...;
if (!f.exists() || !f.isFile()) {
    throw new IllegalArgumentException("Zip input does not exist or is not a file: " + f.getAbsolutePath());
}

Type guard

public static boolean isExistingZip(File f) {
    return f != null && f.isFile() && f.exists();
}

Try / catch

try {
    zipReader.open(file);
} catch (FileNotFoundException e) {
    System.err.println("Input not found: " + e.getMessage());
    // prompt for correct path
}

Prevention

When it happens

Trigger: Calling ZipReader.open(file) (or any API that opens a zip) with a File whose exists() returns false. The absolute path is included in the exception message.

Common situations: Wrong input path; relative path resolved against an unexpected working directory; file deleted between listing and open; case-sensitivity mismatch on case-sensitive filesystems; network/removable mount not attached.

Related errors


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

Appendix: source

Thrown at jadx-commons/jadx-zip/src/main/java/jadx/zip/ZipReader.java:45

		this(ZipReaderOptions.getDefault());
	}

	public ZipReader(Set<ZipReaderFlags> flags) {
		this(new ZipReaderOptions(new JadxZipSecurity(), flags));
	}

	public ZipReader(IJadxZipSecurity security) {
		this(new ZipReaderOptions(security, ZipReaderFlags.none()));
	}

	public ZipReader(ZipReaderOptions options) {
		this.options = options;
	}

	@SuppressWarnings("resource")
	public ZipContent open(File zipFile) throws IOException {
		if (!zipFile.exists()) {
			throw new FileNotFoundException(zipFile.getAbsolutePath());
		}
		try {
			JadxZipParser jadxParser = new JadxZipParser(zipFile, options);
			IZipParser detectedParser = detectParser(zipFile, jadxParser);
			return detectedParser.open();
		} catch (FallbackException e) {
			throw e;
		} catch (Exception e) {
			if (options.getFlags().contains(ZipReaderFlags.DONT_USE_FALLBACK)) {
				throw new IOException("Failed to open zip: " + zipFile, e);
			}
			// switch to fallback parser
			return buildFallbackParser(zipFile).open();
		}
	}

	/**
	 * Visit valid entries in a zip file.

View on GitHub (pinned to e738a26571)