英文:
JAVA_HOME path for ant run command
问题
我正在尝试在我的系统上安装contiki-ng,一切都进行得很顺利,直到我尝试在contiki-ng/tools/cooja
目录中运行ant run
命令,然后我得到了以下响应:
> 我们无法运行Java,请确保您已安装Java。
> 我们尝试执行/usr/lib/jvm/java-11-openjdk-amd64/bin/java/bin/java,但是失败了。
> 如果您在不寻常的位置安装了Java,您可以设置JAVA_HOME
为包含Java安装的目录。
我意识到我需要将.bashrc
文件中的/usr/lib/jvm/java-11-openjdk-amd64/bin/java/bin/java
更改为/usr/lib/jvm/java-11-openjdk-amd64/bin/java
(移除路径末尾的/bin/java;我复制路径时弄错了)。
即使在那样做之后,我仍然收到相同的错误。有人可以帮忙吗?
英文:
I am trying to install contiki-ng in my system and everything has proceeded well, until I try to run the ant run
command in contiki-ng/tools/cooja
directory, upon which I get the following response:
> We cannot run Java, please ensure you have Java installed.
> We have tried to execute /usr/lib/jvm/java-11-openjdk-amd64/bin/java/bin/java but failed.
> If you have installed Java in a unusual place you can set JAVA_HOME
to the directory containing the Java installation.
I realized that I had to change /usr/lib/jvm/java-11-openjdk-amd64/bin/java/bin/java
to /usr/lib/jvm/java-11-openjdk-amd64/bin/java
(remove /bin/java from the end; I had copied the path wrong) in the .bashrc file.
Even after doing that, I am still getting the same error. Can someone help?
答案1
得分: 3
你应该将JAVA_HOME设置为/usr/lib/jvm/java-11-openjdk-amd64
,因为它应该指向Java主目录,而不是bin目录。
英文:
you should have JAVA_HOME set to /usr/lib/jvm/java-11-openjdk-amd64
because it should point to java home directory, not bin directory
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论