Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

JAVA_HOME is not valid?

Writer Matthew Harrington

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

2 Answers

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

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy