When I try to execute any Hadoop commands error pops up saying unable to find or load main class M

+1 vote

I have done the following steps

  1. Extracted the tar.gz into a folder in C:\ ---> C:\hadoop
  2. Created and set the HADOOP_HOME environment variable to C:\hadoop
  3. Updated the PATH environment variable by adding C:\hadoop\bin
  4. Added the JAVA_HOME environment variable and set it to the jdk home folder.
Jul 17, 2018 in Big Data Hadoop by Neha
• 6,280 points
117 views

1 answer to this question.

+1 vote

The error might be due to the syntax problem of the system username.

1. In this case, I request you to go to Hadoop Directory and  edit /etc/hadoop/hadoop-env.cmd

2. At the end of the file, you will find  set HADOOP_IDENT_STRING=%USERNAME%

3.In this, you can change the file name and rename it, but  make sure it does  NOT have the space eg.:

set HADOOP_IDENT_STRING=myedureka

I hope this answer helps :)

answered Jul 17, 2018 by Frankie
• 9,810 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop Mapreduce: Error: Could not find or load main class com.sun.tools.javac.Main

You have to add HADOOP_CLASSPATH environment parameter: export ...READ MORE

answered Oct 30, 2018 in Big Data Hadoop by Omkar
• 67,620 points
401 views
0 votes
1 answer

Hadoop: Error: Could not find or load main class org.apache.hadoop.util.VersionInfo

This seems like a path issue. Add the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 67,620 points
2,202 views
0 votes
1 answer

Hadoop: Error: Could not find or load main class com.sun.tools.javac.Main

It looks like the path is not ...READ MORE

answered Nov 29, 2018 in Big Data Hadoop by Omkar
• 67,620 points
609 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,690 points
3,023 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
• 10,690 points
337 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
14,925 views
0 votes
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,260 points
1,109 views
0 votes
1 answer
0 votes
1 answer