gpt4 book ai didi

java - 告诉intelliJ在java项目中使用scalac编译模块?

转载 作者:行者123 更新时间:2023-12-01 10:27:47 24 4
gpt4 key购买 nike

我在 intelliJ 中有一个 java 项目,并且添加了一些模块,其中一个模块中有 scala 代码。

我想告诉intelliJ用scalac而不是javac编译这个模块,但我不知道在哪里配置它,当我尝试编译它时,它给了我这个错误,“无法创建scalac实例”

最佳答案

https://intellij-support.jetbrains.com/hc/en-us/community/posts/206001829-Project-configuration-explained :

A module that requires compiling with Scalac should have a Scala facet attached.

再往下(我认为你想要的):

To add Scala support to existing module:

  • Right-click the module in Project View, choose "Add Framework Support..."

  • Check "Scala" in technologies list (unavailable if module has Scala facet attached)

  • Provide a path to Scala installation (if not detected)

关于java - 告诉intelliJ在java项目中使用scalac编译模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35275872/

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