scala中的编译错误 [英] Compilation error in scala
本文介绍了scala中的编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是scala的新手。我最近开始使用netbeans来编写scala程序。我安装了scala版本2.11.0.400及其netbeans的插件。当我尝试编译我的scala代码: -
I'm a newbie in scala. I recently started using netbeans for writing scala programs.I have installed scala version 2.11.0.400 and its plugins for netbeans.When I try to compile my scala code:-
package scalaapplication2
object Main {
def main(args: Array[String]): Unit=
{
println("Hello, world!")
}
}
即使设置路径变量后,我也得到以下编译错误: -
I get the following compilation error even after setting the path variables:-
Compiling 1 source file to C:\Users\Nitin\Documents\NetBeansProject\ScalaApplication2\build\classes
C:\Users\Nitin\Documents\NetBeansProjects\ScalaApplication2\nbproject\build- impl.xml:423:
The following error occurred while executing this line:
C:\Users\Nitin\Documents\NetBeansProjects\ScalaApplication2\nbproject\build-impl.xml:238: bad option: '-make:transitive'
为什么是这样?
推荐答案
从scalac addparams选项中删除'-make:transitive'(文件视图> ScalaApplication> build-impl.xml)为我工作。
Removing '-make:transitive' from the scalac addparams option (Files view > ScalaApplication > nbproject > build-impl.xml) worked for me.
这篇关于scala中的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文