1

I'm really hoping someone can help me to fix the issue I'm having and would be extremely grateful for anyone to offer a solution to this issue. …

When I try and launch OpenDaylight, I get the following error: karaf: JAVA_HOME is not valid: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

1
  • 1
    So is it valid? Please add output of ls -lah /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
    – pLumo
    May 8, 2019 at 12:40

2 Answers 2

2

When you install the openjdk JRE or JDK, I don't think, a JAVA_HOME environment variable is created for you.

You have two options, you can setup JAVA_HOME in the script that launches OpenDaylight. I have never used OpenDaylight so, I am not sure if such a script exists.

Secondly, you can take a look at the .bashrc of the id with which OpenDayLight is launching and set JAVA_HOME in this file.

On a related note, do you know if you have a JRE or a JDK? If you have a JDK, you won't see a jre in the path, it will read as, /usr/lib/jvm/java-8-openjdk-amd64/bin/java

0

Try to get JAVA_HOME from Terminal by

echo $JAVA_HOME

Generally java home value should be set as

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

and Update PATH variable as

PATH=$PATH:$JAVA_HOME/bin

4
  • after update PATH ,Error : la commande n'a pas pu être trouvée car << /usr/bin>> n'est pas incluse dans la variable d'environnement PATH May 8, 2019 at 13:00
  • Sorry for the issue. I have updated the solution. Try after rebooting as your PATH variable has been reset May 8, 2019 at 13:04
  • error: karaf: JAVA_HOME is not valid: /usr/lib/jvm/java-8-openjdk-amd64/jre May 8, 2019 at 13:13
  • don't put jre at the end. set till amd64 May 8, 2019 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .