skylot/jadx · critical · JadxRuntimeException
Can't load classpath file:
Error message
Can't load classpath file:
What it means
Thrown by ClsSet.loadFromClstFile when the bundled classpath resource (core.jcst at path /clst/core.jcst) is not found on the classpath. The resource is loaded via getResourceAsStream and a null return means the jcst file is missing from the jadx-core JAR or classpath. This is a packaging/classpath integrity error, not an input-file error.
Source
Thrown at jadx-core/src/main/java/jadx/core/clsp/ClsSet.java:78
}
private enum TypeEnum {
WILDCARD,
GENERIC,
GENERIC_TYPE_VARIABLE,
OUTER_GENERIC,
OBJECT,
ARRAY,
PRIMITIVE
}
private ClspClass[] classes;
public void loadFromClstFile() throws IOException, DecodeException {
long startTime = System.currentTimeMillis();
try (InputStream input = ClsSet.class.getResourceAsStream(CLST_PATH)) {
if (input == null) {
throw new JadxRuntimeException("Can't load classpath file: " + CLST_PATH);
}
load(input);
}
if (LOG.isDebugEnabled()) {
long time = System.currentTimeMillis() - startTime;
int methodsCount = Stream.of(classes).mapToInt(clspClass -> clspClass.getMethodsMap().size()).sum();
LOG.debug("Clst file loaded in {}ms, android api: {}, classes: {}, methods: {}",
time, androidApiLevel, classes.length, methodsCount);
}
}
public void loadFrom(RootNode root) {
List<ClassNode> list = root.getClasses(true);
Map<String, ClspClass> names = new HashMap<>(list.size());
int k = 0;
for (ClassNode cls : list) {
ArgType clsType = cls.getClassInfo().getType();
String clsRawName = clsType.getObject();View on GitHub (pinned to e738a26571)
Solutions
- Verify that core.jcst exists inside the jadx-core JAR: jar tf jadx-core-*.jar | grep clst/core.jcst.
- If missing, rebuild jadx-core from source with the standard Gradle build which bundles the resource, or use the official released JAR.
- If shading/relocating, configure the shade plugin to include all resources, not just .class files.
- Ensure the jadx-core JAR on the classpath is not corrupted — re-download or rebuild if CRC errors appear.
Defensive patterns
Strategy: validation
Validate before calling
// Verify the core.jcst resource exists on the classpath before calling loadFromClstFile
try (InputStream check = ClsSet.class.getResourceAsStream("/clst/core.jcst")) {
if (check == null) {
throw new IllegalStateException("core.jcst not found on classpath — jadx-core JAR may be corrupted or mis-packaged");
}
} Try / catch
try {
clsSet.loadFromClstFile();
} catch (JadxRuntimeException e) {
if (e.getMessage().startsWith("Can't load classpath file:")) {
throw new IllegalStateException("jadx-core is missing its bundled core.jcst resource. "
+ "Rebuild or re-download the jadx-core JAR.", e);
}
throw e;
} Prevention
- When shading or fat-jarring jadx, configure the build to include all resources, not just .class files.
- After building, verify: jar tf jadx-core.jar | grep 'clst/core.jcst' to confirm the resource is present.
- Use official released JARs rather than custom repackaged versions when possible.
When it happens
Trigger: Jadx-core JAR is repackaged or shaded without including the /clst/core.jcst resource. A custom build excluded the resource from the JAR. Running against a corrupted or truncated jadx-core JAR where the resource entry is absent. Using jadx as a library with a minimal classpath that omits the resource directory.
Common situations: Custom Maven/Gradle builds that fat-jar jadx without preserving resources. Modifying the jadx build to relocate or filter resources. A broken jadx installation where core.jcst was deleted from the JAR. CI environments with classpath shading plugins that strip non-class resources.
Related errors
AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14).
Data as JSON: /api/errors/eaa00d464a5d4547.
Report an issue: GitHub.