gpt4 book ai didi

Scala sbt 项目给出 NullPointerException?

转载 作者:行者123 更新时间:2023-12-05 06:35:03 27 4
gpt4 key购买 nike

当我在我的 sbt 项目中运行命令 sbt clean compile run 时,它给出了空指针异常。

这是控制台输出:

[info] Loading project definition from /home/dnilesh/workspace/wipworkspace/gtawip/project
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by sbt.ivyint.ErrorMessageAuthenticator$ (file:/root/.sbt/boot/scala-2.10.4/org.scala-sbt/sbt/0.13.8/ivy-0.13.8.jar) to field java.net.Authenticator.theAuthenticator
WARNING: Please consider reporting this to the maintainers of sbt.ivyint.ErrorMessageAuthenticator$
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.NullPointerException
at java.base/java.util.regex.Matcher.getTextLength(Matcher.java:1769)
at java.base/java.util.regex.Matcher.reset(Matcher.java:416)
at java.base/java.util.regex.Matcher.<init>(Matcher.java:253)
at java.base/java.util.regex.Pattern.matcher(Pattern.java:1147)
at java.base/java.util.regex.Pattern.split(Pattern.java:1264)
at java.base/java.util.regex.Pattern.split(Pattern.java:1335)
at sbt.IO$.pathSplit(IO.scala:744)
at sbt.IO$.parseClasspath(IO.scala:859)
at sbt.compiler.CompilerArguments.extClasspath(CompilerArguments.scala:62)
at sbt.compiler.MixedAnalyzingCompiler$.withBootclasspath(MixedAnalyzingCompiler.scala:189)
at sbt.compiler.MixedAnalyzingCompiler$.searchClasspathAndLookup(MixedAnalyzingCompiler.scala:167)
at sbt.compiler.MixedAnalyzingCompiler$.apply(MixedAnalyzingCompiler.scala:177)
at

最佳答案

您是否有可能运行 Java 9+ 和旧版本的 sbt?

请确保您至少运行 sbt 0.13.17 以实现 JDK 9 兼容性。

关于Scala sbt 项目给出 NullPointerException?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49853830/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com