Thanks a lot.
I studied and tried the WordCount.java program as in the URL http://hadoop.apache.org/docs/r0.20.2/mapred_tutorial.html
$ javac -version
$javac -classpath /usr/local/hadoop-1.0.4/hadoop-core-1.0.4.jar:/usr/local/hadoop-1.0.4/lib/commons-cli-1.2.jar -d wordcount_classes WordCount.java
I get 48 compilation errors. The first few are like:
WordCount.java:6: package org.apache.hadoop.fs does not exist
WordCount.java:7: package org.apache.hadoop.conf does not exist
It seems the javac compiler cannot locate the hadoop packages. Is there any other way to include the packages in the compilation command? Thank you.
From: Robert Evans <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>; R J <[EMAIL PROTECTED]>
Sent: Wednesday, November 14, 2012 3:36 PM
Subject: Re: Hadoop Java compilation error
Hadoop is not a java runtime environment it runs special map/reduce applications. Go search for "how to write a hadoop program" and there will be lots of examples or you can pick up a book on Hadoop and that can help you with some examples too.
From: R J <[EMAIL PROTECTED]>
Reply-To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, R J <[EMAIL PROTECTED]>
Date: Wednesday, November 14, 2012 3:00 PM
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Subject: Hadoop Java compilation error
I installed Hadoop 1.0.4 on Cygwin and tried to run Java HelloWorld but I get exception error:
$ bin/hadoop javac HelloWorld.java
Exception in thread "main"
$ echo $JAVA_HOME
$ javac HelloWorld.java
$ java HelloWorld
I have set JAVA_HOME environment variable in hadoop-env.sh .
How do I make it work on hadoop?