Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Error: Could not find or load main class org.apache.hadoop.util.RunJar"?

Tags:

java

hadoop

I am trying to run an example as it is pointed in Hadoop in Action book page 15. this is the command that needs to be run :

bin/hadoop jar hadoop-*-examples.jar

but I get this error

"Error: Could not find or load main class org.apache.hadoop.util.RunJar"

It seems like a classpath issue or something. Can someone point out some guideline ?

Actually I am not able to run any of hadoop commands like version, fs, jar ... and so on .. !

NOTE: I am using windows.

like image 895
Adelin Avatar asked Dec 11 '13 14:12

Adelin


2 Answers

[Edited] Okay, i was reading too fast, you mentioned you were not able to run hadoop fs commands as well. I guess you might miss a few congifurations or haven't start the services at all. Try following this tutorial step by step.


you will need to pass in the class name, for example:

bin/hadoop jar hadoop-*-examples.jar org.apache.hadoop.examples.WordCount [input] [output]
like image 112
zhutoulala Avatar answered Oct 14 '22 09:10

zhutoulala


It is probably so late answer, but any way.

Just check that HADOOP_PREFIX environment variable is set correctly (points to your hadoop installed directory).

like image 31
Sergey Avatar answered Oct 14 '22 10:10

Sergey