mvn clean install command

51 views
Skip to first unread message

Mohamed Oualla

unread,
Jun 12, 2022, 10:40:43 AM6/12/22
to ONOS Discuss
Hi all,
I want to allow external ONOS application to see and utilize all the services
provided by the ONOS core, so i did the command : mvn clean install. It gives me an error is that: Error: JAVA_HOME is not defined correctly.
  We cannot execute /usr/bin/java/bin/java.
I already installed java, bazel, and i did the command ok -- clean, to build onos project.
Please any help?

0ice...@gmail.com

unread,
Jun 12, 2022, 10:49:28 AM6/12/22
to ONOS Discuss, oualla.s...@gmail.com
Hi oualla,

seems that you haven't set the java home, what did you get when you run echo $JAVA_HOME ? if is empty you have to looking how set it
best
davide


Mohamed Oualla

unread,
Jun 12, 2022, 11:44:08 AM6/12/22
to ONOS Discuss, 0ice...@gmail.com, Mohamed Oualla
Hello,
Thanks for the fast answer, in .bashrc, i added the line ". ~/onos/tools/dev/bash_profile", maybe this sets JAVA_HOME, and yes i enter tap $JAVA_HOME and gives me the result:JAVA_HOME.PNG
Best.
OUALLA Mohamed

0ice...@gmail.com

unread,
Jun 12, 2022, 12:05:39 PM6/12/22
to ONOS Discuss, oualla.s...@gmail.com
Hi,
  1. I added the line ". ~/onos/tools/dev/bash_profile", maybe this sets JAVA_HOME  I think that don't do that
  2. When you run echo  $JAVA_HOME you should obtain the the path to jdk,
best
ds

Mohamed Oualla

unread,
Jun 12, 2022, 12:42:03 PM6/12/22
to ONOS Discuss, 0ice...@gmail.com, Mohamed Oualla
hi,
this is what i got:echo JAVA_HOME.PNG
best

0ice...@gmail.com

unread,
Jun 12, 2022, 12:52:11 PM6/12/22
to ONOS Discuss, oualla.s...@gmail.com, 0ice...@gmail.com
Hi,
The JAVA_HOME should have the path to the jdk. https://linuxhint.com/set-java-home-linux/
best
davide

Mohamed Oualla

unread,
Jun 12, 2022, 1:48:14 PM6/12/22
to ONOS Discuss, 0ice...@gmail.com, Mohamed Oualla
Hi,
Finally, it worked, i followed the steps here on the link you provided me, thank you, i appreciate your time and help.
Best regards
OUALLA Mohamed

Reply all
Reply to author
Forward
0 new messages