oracle/graal · error · GraalError

%s does not support META-INF/libgraal.java.home protocol (se

Error message

%s does not support META-INF/libgraal.java.home protocol (see javadoc of HostedLibGraalClassLoader)

What it means

Error "%s does not support META-INF/libgraal.java.home protocol (see javadoc of HostedLibGraalClassLoader)" thrown in oracle/graal.

Source

Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/LibGraalFeature.java:131

            throw new GraalError(ex);
        }
    }

    public static final class IsEnabled implements BooleanSupplier {
        @Override
        public boolean getAsBoolean() {
            Class<LibGraalFeature> clazz = LibGraalFeature.class;
            return ImageSingletons.contains(clazz);
        }
    }

    /**
     * See javadoc for {@code jdk.graal.compiler.libgraal.loader.HostedLibGraalClassLoader}.
     */
    private static Path readLibgraalJavaHome(ClassLoader cl) {
        try (InputStream in = cl.getResourceAsStream("META-INF/libgraal.java.home")) {
            if (in == null) {
                throw new GraalError(cl.getClass().getName() + " does not support META-INF/libgraal.java.home protocol (see javadoc of HostedLibGraalClassLoader)");
            }
            return Path.of(new String(in.readAllBytes()));
        } catch (IOException e) { // Parfait_ALLOW impossible-redundant-condition (PARSEC-7191)
            throw new GraalError(e);
        }
    }

    private final LibGraalLoader libgraalLoader = (LibGraalLoader) getClass().getClassLoader();
    private final Path libgraalJavaHome = readLibgraalJavaHome(getClass().getClassLoader());

    private BeforeAnalysisAccess beforeAnalysisAccess;
    private BeforeCompilationAccess beforeCompilationAccess;
    private OptionCollector optionCollector;

    @Override
    public void onRegistration(OnRegistrationAccess access) {
        ImageSingletons.add(LibGraalFeature.class, this);
    }

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Fix the condition reported by the error: {} does not support META-INF/libgraal.java.home protocol
  2. Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call.

Example fix

Validate inputs and environment so that the failing condition does not occur: {} does not support META-INF/libgraal.java.home protocol

When it happens

Trigger: Thrown at compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/LibGraalFeature.java:131 when the library encounters an invalid state.

Common situations: Occurs when a caller violates the contract guarded by this check: {} does not support META-INF/libgraal.java.home protocol


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/8fc0a91981bf8551. Report an issue: GitHub.