Getting error in JAVA HOME variable

0 votes

I added JAVA_HOME & Java path in my .bashrc file. I can see the value once I execute the following command:

$ echo $JAVA_HOME
/usr/lib/jdk/java-8-openjdk/

I have also added my JAVA_HOME in hadoop-env.sh file.

export JAVA_HOME="/usr/lib/jdk/java-8-openjdk/"


But still when I am executing the hadoop namenode -format, I am getting the below error

$ hadoop namenode -format
Warning: $HADOOP_HOME is deprecated.
/usr/bin/hadoop: line 320: /usr/lib/jdk/java-8-openjdk/bin/java: No such file or directory
/usr/bin/hadoop: line 390: /usr/lib/jdk/java-8-openjdk/bin/java: No such file or directory
May 11, 2018 in Big Data Hadoop by punk100
2,224 views

1 answer to this question.

0 votes
First of all check the hadoop version command in the shell. It should give you the version of Hadoop. If you are not getting the output and giving you the Java error, possible reasons can be: check your OS is 32 or 64 bit and then check the Java, is it 32 or 64.

Go ahead and verify the Java path in both bashrc file as well as hadoop-env.sh file. If the problem still persists, kindly try installing JAVA via alternatives.
answered May 11, 2018 by Shubham
• 13,490 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Getting error in MapReduce job.setInputFormatClass

In old Hadoop API(i.e. below Hadoop 0.20.0), ...READ MORE

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

Getting error in Hadoop Streaming: Type mismatch in Key from Map

In Hadoop streaming you have to customize ...READ MORE

answered Apr 18, 2018 in Big Data Hadoop by coldcode
• 2,090 points
1,255 views
0 votes
1 answer

Getting error in Hadoop: Output file already exist

When you executed your code earlier, you ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,490 points
8,514 views
0 votes
1 answer

Getting error in Custom Input Format

Use this property directly to delimit the ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,490 points
628 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,669 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,543 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
11,028 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,832 views
0 votes
1 answer
0 votes
1 answer

Getting error in command hdfs dfs -mkdir

You are getting this error because the ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,490 points
3,264 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