-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
minimized code
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 class f
Caused by: 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 -- Copyright 2002-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.