导入的 Scala 项目没有 运行 选项
Imported Scala Project has no run option
我正在参加在线课程,并被指示将一组练习作为项目导入 IDEA。在构建和重建项目后,我无法 运行 类。
有一个单独的入门课程向您展示如何完成所有这些并且它运行良好,所以我不确定哪里出了问题。
No option to run the class
The getting started project works fine
我比较了 build.project 文件,发现错误:
Errors in the main project for the course
我收到一条关于我在 运行
时无法解决的问题的消息
sbt sbtVersion
在我的项目目录中:
PS M:\School\Scala Applied Part 1> cd .\exercises-applied\
PS M:\School\Scala Applied Part 1\exercises-applied> sbt sbtVersion
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by sbt.TrapExit$ (file:/C:/Users/*/.sbt/boot/scala-2.12.4/org.scala-sbt/sbt/1.1.0/run
_2.12-1.1.0.jar)
WARNING: Please consider reporting this to the maintainers of sbt.TrapExit$
WARNING: System::setSecurityManager will be removed in a future release
[info] Loading project definition from M:\School\Scala Applied Part 1\exercises-applied\project
error: error while loading String, class file '/modules/java.base/java/lang/String.class' is broken
(class java.lang.NullPointerException/Cannot invoke "scala.tools.nsc.Global$Run.typerPhase()" because the return value of "scala.tools.nsc.Gl
obal.currentRun()" is null)
我好像找不到
/modules/java.base/java/lang/String.class
在文件结构中,我不知道如何更新它。
build.sbt需要蜜蜂在根目录下。我已经更改了项目的根目录,并且构建良好。谢谢马特乌斯!
我正在参加在线课程,并被指示将一组练习作为项目导入 IDEA。在构建和重建项目后,我无法 运行 类。 有一个单独的入门课程向您展示如何完成所有这些并且它运行良好,所以我不确定哪里出了问题。
No option to run the class
The getting started project works fine
我比较了 build.project 文件,发现错误: Errors in the main project for the course
我收到一条关于我在 运行
时无法解决的问题的消息sbt sbtVersion
在我的项目目录中:
PS M:\School\Scala Applied Part 1> cd .\exercises-applied\
PS M:\School\Scala Applied Part 1\exercises-applied> sbt sbtVersion
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by sbt.TrapExit$ (file:/C:/Users/*/.sbt/boot/scala-2.12.4/org.scala-sbt/sbt/1.1.0/run
_2.12-1.1.0.jar)
WARNING: Please consider reporting this to the maintainers of sbt.TrapExit$
WARNING: System::setSecurityManager will be removed in a future release
[info] Loading project definition from M:\School\Scala Applied Part 1\exercises-applied\project
error: error while loading String, class file '/modules/java.base/java/lang/String.class' is broken
(class java.lang.NullPointerException/Cannot invoke "scala.tools.nsc.Global$Run.typerPhase()" because the return value of "scala.tools.nsc.Gl
obal.currentRun()" is null)
我好像找不到
/modules/java.base/java/lang/String.class
在文件结构中,我不知道如何更新它。
build.sbt需要蜜蜂在根目录下。我已经更改了项目的根目录,并且构建良好。谢谢马特乌斯!