Skip to content

"sbt dotr" does not automatically put scala-library on the classpath anymore #3496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
smarter opened this issue Nov 17, 2017 · 1 comment
Closed

Comments

@smarter
Copy link
Member

smarter commented Nov 17, 2017

This was recently broken (I guess by #3436):

> dotc tests/pos/HelloWorld.scala
> dotr HelloWorld
Exception in thread "main" java.lang.NoClassDefFoundError: scala/Predef$
        at HelloWorld$.main(HelloWorld.scala:2)
        at HelloWorld.main(HelloWorld.scala)
Caused by: java.lang.ClassNotFoundException: scala.Predef$
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 2 more

Workaround: doing dotr -classpath /path/to/scala-library-2.12.4.jar or using the ./bin/dotr script.

nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 17, 2017
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 17, 2017
Order expected by java command. In which all options are expected
(such as -classpath) are expected to be on the left of the first
class name.
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 17, 2017
Order expected by java command. In which all options are expected
(such as -classpath) are expected to be on the left of the first
class name.
nicolasstucki added a commit to dotty-staging/dotty that referenced this issue Nov 17, 2017
Order expected by java command. In which all options are expected
(such as -classpath) are expected to be on the left of the first
class name.
nicolasstucki added a commit that referenced this issue Nov 17, 2017
Fix #3496: Insert classpath before other arguments
@gosubpl
Copy link
Contributor

gosubpl commented Nov 19, 2017

Works now like a charm. Thanks @nicolasstucki !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants