diff --git a/sdk/src/org.graalvm.polyglot/src/org/graalvm/polyglot/Engine.java b/sdk/src/org.graalvm.polyglot/src/org/graalvm/polyglot/Engine.java index 9ec44c19491a..91211f33c72d 100644 --- a/sdk/src/org.graalvm.polyglot/src/org/graalvm/polyglot/Engine.java +++ b/sdk/src/org.graalvm.polyglot/src/org/graalvm/polyglot/Engine.java @@ -2132,18 +2132,8 @@ public boolean copyResources(Path targetFolder, String... components) { } private static RuntimeException noPolyglotImplementationFound() { - if (PolyglotInvalid.class.getModule().isNamed()) { - return new IllegalStateException( - "No language and polyglot implementation was found on the module-path. " + - "Make sure at last one language is added to the module-path. "); - } else { - return new IllegalStateException( - "No language and polyglot implementation was found on the class-path. " + - "Make sure at last one language is added on the class-path. " + - "If you put a language on the class-path and you encounter this error then there could be a problem with isolated class loading. " + - "Use -Dpolyglotimpl.TraceClassPathIsolation=true to debug class loader islation problems. " + - "For best performance it is recommended to use polyglot from the module-path instead of the class-path."); - } + return new IllegalStateException("No language and polyglot implementation was found on the module-path. " + + "Make sure at last one language is added to the module-path. "); } @Override