2

I'm trying to set up OpenDaylight which is a SDN controller on Ubuntu Virtual Box. The version of Ubuntu is 18.04. OpenDaylight requires java-8-openjdk-amd64 and I have installed it successfully:

See below:

liv@liv-VirtualBox:~$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)

Have also set the JAVA_HOME path by adding the below to /etc/environment:

JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java"

I checked the JAVA path by typing in echo $JAVA_HOME at the terminal CLI and the echo result being /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java

So, I'm thinking that I have covered all the steps.. :)

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

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.

0

1 Answer 1

2

JAVA_HOME should be set as "/usr/lib/jvm/java-8-openjdk-amd64/"

4
  • 1
    Hi Amutheezan Thank you for taking the time to provide a solution. I have changed the path in /etc/environment to "JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/" however when I echo JAVA_HOME, I still get the following... liv@liv-VirtualBox:~$ echo $JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java Am I missing something? :) Are you able to tell me why my change doesn't take effect and / or how I can fix this? Appreciate your time.
    – Liv
    Oct 1, 2018 at 3:46
  • restart the computer and try again. In case if you add that as a line to file to .bashrc you can just try source .bashrc and that will sync JAVA_HOME correctly with easy anyway both approaches are okay
    – Amutheezan
    Oct 1, 2018 at 3:48
  • 1
    Hi Amutheezan,Thank you so much!! :) you have solved my issue. I truly appreciate you taking the time to help me with my issue..
    – Liv
    Oct 1, 2018 at 4:15
  • @Liv Dont hesitate follow this stackoverflow.com/help/someone-answers :)
    – Amutheezan
    Oct 1, 2018 at 4:20

You must log in to answer this question.

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