Unable to set JAVA HOME path

0 votes

While working on Hadoop Implementation in Pseudo-Distributed Operation, I found following exception of JAVA_HOME variable not set, but When I tried to echo it, it was set.

Variable is preset in conf/hadoop-env.sh (edited export JAVA_HOME=/usr/lib/jvm/java-6-sun), bash.bashrc.

usr@usr-HP-G62-Notebook-PC:~/hadoop-0.20.203.0$ echo $JAVA_HOME
/usr/lib/jvm/java-6-sun
usr@usr-HP-G62-Notebook-PC:~/hadoop-0.20.203.0$ bin/start-all.sh
starting namenode, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-namenode-usr-HP-G62-Notebook-PC.out
localhost: starting datanode, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-datanode-usr-HP-G62-Notebook-PC.out
localhost: Error: JAVA_HOME is not set. 
localhost: starting secondarynamenode, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-secondarynamenode-usr-HP-G62-Notebook-PC.out
localhost: Error: JAVA_HOME is not set. 
starting jobtracker, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-jobtracker-usr-HP-G62-Notebook-PC.out 
localhost: starting tasktracker, logging to /home/usr/hadoop-0.20.203.0/bin/../logs/hadoop-usr-tasktracker-usr-HP-G62-Notebook-PC.out
localhost: Error: JAVA_HOME is not set.
Dec 1, 2018 in Big Data Hadoop by slayer
• 29,350 points
1,269 views

1 answer to this question.

0 votes
Check if bin/start-all.sh doesn't override JAVA_HOME

put echo $JAVA_HOME inside that script straight before executes binaries.
answered Dec 1, 2018 by Omkar
• 69,210 points

Related Questions In Big Data Hadoop

0 votes
1 answer
0 votes
1 answer

How to set output path for sqoop generated code?

To set output path for the generated ...READ MORE

answered May 17, 2019 in Big Data Hadoop by Suman
1,011 views
0 votes
1 answer

Unable to Locate WinUtils Library in Hadoop binary path.

If you are facing this problem while running a ...READ MORE

answered Jul 11, 2019 in Big Data Hadoop by ravikiran
• 4,620 points
1,801 views
0 votes
1 answer

Unable to install RHadoop Packages?

I would recommend you to follow https://github.com/RevolutionAnalytics/rhadoop/wiki/Installing-RHadoop-on-RHEL ...READ MORE

answered Mar 22, 2018 in Big Data Hadoop by Shubham
• 13,490 points
1,391 views
0 votes
1 answer

Moving files in Hadoop using the Java API?

I would recommend you to use FileSystem.rename(). ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,470 views
0 votes
1 answer

Hadoop giving java.io.IOException, in mkdir Java code.

I am not sure about the issue. ...READ MORE

answered May 3, 2018 in Big Data Hadoop by Shubham
• 13,490 points
2,230 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
10,556 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 11,380 points
2,184 views
0 votes
1 answer

Hadoop on OSX “Unable to load realm info from SCDynamicStore”

Add the following to your hadoop-env.sh file: export ...READ MORE

answered Oct 8, 2018 in Big Data Hadoop by Omkar
• 69,210 points
489 views
+4 votes
3 answers

Unable to find file error- while Streaming Hadoop

Is python installed running on the slaves that ...READ MORE

answered Oct 16, 2018 in Big Data Hadoop by Vinith
3,704 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP