Advertisement
lamiastella

JAVA_HOME error

Nov 27th, 2015
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. $echo $JAVA_HOME
  2. /usr/lib/jvm/java-1.7.0-openjdk-amd64
  3.  
  4. The error I get:
  5. ************************************************************/
  6. 10.0.1.193: Error: JAVA_HOME is not set and could not be found.
  7. 10.0.1.190: Error: JAVA_HOME is not set and could not be found.
  8. 10.0.1.191: Error: JAVA_HOME is not set and could not be found.
  9. 10.0.1.192: Error: JAVA_HOME is not set and could not be found.
  10. ----------------------------------------------------------------
  11. What exists in hadoop-config.sh:
  12.  
  13. # Attempt to set JAVA_HOME if it is not set
  14. if [[ -z $JAVA_HOME ]]; then
  15. # On OSX use java_home (or /Library for older versions)
  16. if [ "Darwin" == "$(uname -s)" ]; then
  17. if [ -x /usr/libexec/java_home ]; then
  18. export JAVA_HOME=($(/usr/libexec/java_home))
  19. else
  20. export JAVA_HOME=(/Library/Java/Home)
  21. fi
  22. fi
  23.  
  24. # Bail if we did not detect it
  25. if [[ -z $JAVA_HOME ]]; then
  26. echo "Error: JAVA_HOME is not set and could not be found." 1>&2
  27. exit 1
  28. fi
  29. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement