0

**hii I am following this tutorial to run wordcount

http://edataanalyst.com/2013/08/the-definitive-cloudera-hadoop-wordcount-tutorial/#comment-257

cloudera@localhost ~]$ ls
datasets Downloads Music students.text WordCount_Classes workspace
Desktop eclipse Pictures Templates WordCount.java
Documents lib Public Videos WordCount.java~


[cloudera@localhost ~]$ javac -cp /usr/lib/hadoop/*:/usr/lib/hadoop/client-0.20/* -d WordCount_Classes/WordCount.java

no matter what i do i get this error javac: directory not found: WordCount_Classes/WordCount.java Usage: javac use -help for a list of possible options

i did create a dir by typing mkdir WordCount_classes

i have tried to check class path it returned blank

so i set it with this command

export CLASSPATH=/usr/lib/hadoop/client-0.20/*:/usr/lib/hadoop/*

even when type echo

 $HADOOP_HOME OR PREFIX OR MAPRED ALL RETURN BLANK 

replaced "usr" with cloudera, clouderauser, home but none worked.

please help thanks sorry if i am not clear id did the best i can do im very new to programming world thanks.**

1 Answers1

0

You are passing wrong arguments with -d.

javac -cp /usr/lib/hadoop/*:/usr/lib/hadoop/client-0.20/* -d /home/cloudera/WordCount_Classes WordCount.java

Enter directory path as per your system

Ramanan
  • 1,000
  • 1
  • 7
  • 20
  • With -d you have to pass a directory as a parameter, where you have passed dir+filename as parameter. Correct way is `-d dir filename`. Check the space between dir and filename – Ramanan Jun 26 '14 at 05:32