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
I was tripped up by -cp not meaning -classpath. Also by -help not offering any.
➜ dotr -classpath /tmp/stuff f
OK➜ dotr -cp /tmp/stuff f
Error:Unable to initialize main classfCausedby: java.lang.NoClassDefFoundError: scala/util/CommandLineParser$ParseError➜ dotr -help
Starting dotty REPL...
scala>➜ dotr -version
Starting dotty REPL...
Dotty compiler version 0.21.0-RC1--Copyright2002-2019, LAMP/EPFL
scala>
Or maybe it does mean some kind of classpath, because that looks like it found the entry point but nothing else. This is finding nothing, or not finding anything:
➜ dotr -classpath junk nada
Error: Could not find or load main class nada
Caused by: java.lang.ClassNotFoundException: nada
Compilation output
As per transcript.
expectation
Common options explained by dotr -help. Most people won't use it at the shell or sbt prompt anyway.
OK, it just completed in sbt, where it looks like options are passed on to java. So -cp must be fielded by java, explaining the result above.
The text was updated successfully, but these errors were encountered:
I just ran into this. The runner passes options other than {-repl, -run, -classpath, -with-compiler, -d, -J*}, directly to the JVM as residual_args. The JVM accepts -cp as alias for -cp and this ovewrwrites the setting of "-classpath \"$cp_arg\"" which includes the standard library.
minimized code
I was tripped up by
-cp
not meaning-classpath
. Also by-help
not offering any.Or maybe it does mean some kind of classpath, because that looks like it found the entry point but nothing else. This is finding nothing, or not finding anything:
Compilation output
As per transcript.
expectation
Common options explained by
dotr -help
. Most people won't use it at the shell or sbt prompt anyway.OK, it just completed in sbt, where it looks like options are passed on to java. So
-cp
must be fielded by java, explaining the result above.The text was updated successfully, but these errors were encountered: