Buildr 找不到来自 Intellij 的 JAVA_HOME
我在 Ubuntu 上安装了 Buildr,它可以从命令行正常运行。我还安装了 Intellij IDEA 的 Buildr 插件。但我无法从 IDE 运行诸如 compile
之类的命令。它给出以下消息:
/usr/local/bin/buildr compile (in /path/to/project, development) Compiling scala-spike Compiling scala-spike into /path/to/project/target/classes Buildr aborted! RuntimeError : Are we forgetting something? JAVA_HOME not set.
但是JAVA_HOME
已设置。命令 echo $JAVA_HOME
打印 Java 安装的正确路径。
I have Buildr installed on Ubuntu and it works fine running from command line. I've also installed the Buildr plugin for Intellij IDEA. But I can't run commands such as compile
from the IDE. It gives the following message:
/usr/local/bin/buildr compile (in /path/to/project, development) Compiling scala-spike Compiling scala-spike into /path/to/project/target/classes Buildr aborted! RuntimeError : Are we forgetting something? JAVA_HOME not set.
But JAVA_HOME
is set. The command echo $JAVA_HOME
prints the correct path where Java is installed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保在启动 idea.sh 时传递
JAVA_HOME
。尝试使用
sh -c "export JAVA_HOME=/opt/java && $IDEA/bin/idea.sh"
启动 IDEAMake sure that you are passing
JAVA_HOME
while starting idea.sh.Try starting IDEA with
sh -c "export JAVA_HOME=/opt/java && $IDEA/bin/idea.sh"