我希望能够指定从命令行运行SBT项目时要使用的主类,而不必像在此示例中那样从列表中选择它:
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
Multiple main classes detected, select one to run:
[1] sample.stream.BasicTransformation
[2] sample.stream.GroupLogFile
[3] sample.stream.TcpEcho
[4] sample.stream.WritePrimes
Enter number:
答案 0 :(得分:2)
要运行特定的类,命令为:
sbt "runMain my.class.Name param1 param2"