Activator - 如何使用-Xlint重新编译:未选中?

时间:2015-09-23 15:50:48

标签: scala playframework sbt playframework-2.3 typesafe-activator

我使用run内的activator命令运行我的播放应用程序。当我打开索引页面时,在编译源代码后,控制台会打印

[warn] Note: Some input files use unchecked or unsafe operations.
[warn] Note: Recompile with -Xlint:unchecked for details.

我该怎么做?如何使用该参数重新编译?我尝试使用activator -J-Xlint:uncheckedJAVA_OPTS="-Xlint:unchecked" activator运行激活器,两者都导致了

Unrecognized option: -Xlint:unchecked
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

1 个答案:

答案 0 :(得分:8)

将此添加到您的build.sbt:

javacOptions += "-Xlint:unchecked"