You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with any later version (tested with 22.3.3, 23.0.2 and 24.0.1), I get this:
$ /Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.3.3/Contents/Home/bin/js --version
GraalVM JavaScript (GraalVM CE Native 22.3.3)
$ /Library/Java/JavaVirtualMachines/graalvm-ce-java17-22.3.3/Contents/Home/bin/js --jvm "--vm.cp=/tmp/jackson/*" --vm.Dpolyglot.js.load-from-classpath=true --vm.Dpolyglot.js.load-from-url=true
> Java.type("com.fasterxml.jackson.core.JsonParser")
TypeError: Access to host class com.fasterxml.jackson.core.JsonParser is not allowed or does not exist.
at <js> :program(<shell>:1:1:0-49)
Java.addToClasspath() with a wildcard does not work either:
> Java.addToClasspath("/tmp/jackson/*")
> Java.type("com.fasterxml.jackson.core.JsonParser")
TypeError: Access to host class com.fasterxml.jackson.core.JsonParser is not allowed or does not exist.
at <js> :program(<shell>:3:1:0-49)
It does not seem to be a problem with GraalVM in general because when printing out the java.class.path in a Java program, it still gets expanded (the program simply prints java.lang.System.getProperty("java.class.path")):
Confirmed. I think this was caused by the switch to thin language launchers. It was kind of working by accident before.
You can work around it by doing the expansion yourself (via command line (shell) or Java.addToClasspath + host interop). Or you could try to use module path.
We'll probably implement launcher support for this eventually, but it's not a priority for us right now.
It seems that since GraalJS 22.x, wildcards in the classpath do not work anymore.
Before (21.x), I got this behavior:
with any later version (tested with 22.3.3, 23.0.2 and 24.0.1), I get this:
Java.addToClasspath()
with a wildcard does not work either:However, listing the jar files explicitly works:
It seems that before 22.x, the wildcard was expanded at some point:
After 22.x, the wildcard appears in the classpath as-is:
It does not seem to be a problem with GraalVM in general because when printing out the
java.class.path
in a Java program, it still gets expanded (the program simply printsjava.lang.System.getProperty("java.class.path")
):The text was updated successfully, but these errors were encountered: