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
232 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,350 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,350 points
441 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,040 points
282 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,350 points
1,739 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,350 points
43 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,350 points
961 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,350 points
506 views
0 votes
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
• 10,760 points
3,539 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
18,019 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,350 points
505 views