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
105 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,210 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,210 points
269 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,010 points
204 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,210 points
1,112 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,210 points
27 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,210 points
689 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,210 points
331 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,150 points
2,062 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,561 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,210 points
383 views