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
$ cs launch org.scalameta:metac_2.13.1:4.3.0 -- -cp $(cs fetch -p org.scala-lang:scala-library:2.13.1) Test.scala
Exception in thread "main" java.lang.RuntimeException: unsupported classloader: jdk.internal.loader.ClassLoaders$AppClassLoader@6ff3c5b5
at scala.sys.package$.error(package.scala:27)
at scala.meta.internal.metac.Main.process(Main.scala:23)
at scala.meta.cli.Metac$.process(Metac.scala:36)
at scala.meta.cli.Metac$.process(Metac.scala:27)
at scala.meta.cli.Metac$.main(Metac.scala:10)
at scala.meta.cli.Metac.main(Metac.scala)
I opened the issue in Coursier (coursier/coursier#1572) and found out it's also possible to blow it up with the old launcher, by making it spawn a new JVM:
$ coursier launch --fork org.scalameta:metac_2.13.1:4.3.0 -- -cp $(coursier fetch -p org.scala-lang:scala-library:2.13.1) Test.scala
Exception in thread "main" java.lang.RuntimeException: unsupported classloader: jdk.internal.loader.ClassLoaders$AppClassLoader@6ff3c5b5
at scala.sys.package$.error(package.scala:27)
at scala.meta.internal.metac.Main.process(Main.scala:23)
at scala.meta.cli.Metac$.process(Metac.scala:36)
at scala.meta.cli.Metac$.process(Metac.scala:27)
at scala.meta.cli.Metac$.main(Metac.scala:10)
at scala.meta.cli.Metac.main(Metac.scala)
The text was updated successfully, but these errors were encountered:
dwijnand
changed the title
metac is fragile on JDK 11 (URLClassLoader/application class loader)
metac is fragile on JDK 11 (URLClassLoader/app class loader)
Feb 12, 2020
One of the changes in JDK 11 is that the application classloader isn't a
URLClassLoader
, see https://blog.codefx.org/java/java-11-migration-guide/#Casting-To-URL-Class-Loader.While looking at https://scalameta.org/docs/semanticdb/guide.html#installation, I switch the instructions to use Coursier's sexy, new
cs
launchers, and found it to blow up because I was using JDK 11:I opened the issue in Coursier (coursier/coursier#1572) and found out it's also possible to blow it up with the old launcher, by making it spawn a new JVM:
(There's also a few more references to URLClassLoader in the repo: https://github.com/scalameta/scalameta/search?q=URLClassLoader.)
The text was updated successfully, but these errors were encountered: