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?
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