contiki-ng / cooja

This is a fork of the Cooja network simulator from contiki-os/contiki
Other
30 stars 48 forks source link

Failed to run Cooja #1305

Closed FatimaAN95 closed 1 year ago

FatimaAN95 commented 1 year ago

Hello, I am trying to run Cooja for the first time, but I keep seeing this error. However, I installed and configured everything as it's in the original documentation. Could you please help me in this? Thank you.


fatimaalnuaimi@fan:~/contiki-ng/tools/cooja$ ./gradlew run
Path for java installation '/usr/lib/jvm/openjdk-11' (Common Linux Locations) does not contain a java executable

FAILURE: Build failed with an exception.

* Where:
Build file '/home/fatimaalnuaimi/contiki-ng/tools/cooja/build.gradle' line: 87

* What went wrong:
A problem occurred evaluating root project 'cooja'.
> Could not create task ':copyDependencies'.
   > Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
      > No matching toolchains found for requested specification: {languageVersion=17, vendor=any, implementation=vendor-specific}.
         > No locally installed toolchains match (see https://docs.gradle.org/8.1.1/userguide/toolchains.html#sec:auto_detection) and toolchain download repositories have not been configured (see https://docs.gradle.org/8.1.1/userguide/toolchains.html#sub:download_repositories).

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 405ms
FatimaAN95 commented 1 year ago

Solved: I was using Java 18, and I should use Java 17.