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

0 votes

I have properly installed hadoop but when I run the following command:

Compile WordCount.java and create a jar:
$ bin/hadoop com.sun.tools.javac.Main WordCount.java 

I get this error:

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

Oct 30, 2018 in Big Data Hadoop by slayer
• 29,310 points
2,008 views

1 answer to this question.

0 votes

You have to add HADOOP_CLASSPATH environment parameter:

export HADOOP_CLASSPATH=/usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar

answered Oct 30, 2018 by Omkar
• 69,150 points

Related Questions In Big Data Hadoop

+2 votes
1 answer

windows 10 C:\Users\mk>hadoop -version output:- Error: Could not find or load main class P.

Hey, I guess the error you are facing ...READ MORE

answered May 10, 2019 in Big Data Hadoop by Gitika
• 65,950 points
1,373 views
0 votes
1 answer

Format HDFS Namenode Error: Could not find or load main class ”-Djava.library.path=.home.hadoop.hadoop-3.2.1.lib.native”

Hi@fwood, According to your configuration, you didn't set ...READ MORE

answered Jun 12, 2020 in Big Data Hadoop by MD
• 95,300 points
4,070 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,480 points
1,808 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,480 points
1,376 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
7,804 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
• 11,380 points
1,299 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
• 69,150 points
2,784 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
• 69,150 points
8,957 views