有没有办法指定运行哪个应用程序而不是让它问我?
> test:run
Multiple main classes detected
[1] junk.Hi
[2] junk.Ho
[3] junk.Hey
Enter number:
我试过这样做,但没有帮助:
> set mainClass in (Compile, test) := Some("junk.Ho")
这不起作用(大概)因为要运行的应用程序在测试源中:
> runMain junk.Ho
[info] Running junk.Ho
[error] (run-main) java.lang.ClassNotFoundException: junk.Ho