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
137 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,290 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,290 points
319 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,020 points
234 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,290 points
1,324 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,290 points
35 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,290 points
797 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,290 points
395 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,670 points
2,686 views
0 votes
10 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
13,370 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,290 points
432 views