Dec 2
Can’t compile the example WordCount.java (Hadoop)
http://mail-archives.apache.org/mod_mbox/hadoop-common-user/200907.mbox/%3Cd6d7c4410907201717t672e4caet3f369d7e4327ff7b@mail.gmail.com%3E
Seen this?
Rajat@rtde ~/java
$ javac -classpath /home/Rajat/hadoop-0.20.1/hadoop-0.20.1-core.jar -d
wordcount_classes WordCount.javaWordCount.java:5: package org.apache.hadoop.fs does not exist
import org.apache.hadoop.fs.Path;WordCount.java:6: package org.apache.hadoop.conf does not exist
import org.apache.hadoop.conf.*;
^
WordCount.java:7: package org.apache.hadoop.io does not exist
import org.apache.hadoop.io.*;
^
WordCount.java:8: package org.apache.hadoop.mapred does not exist
import org.apache.hadoop.mapred.*;
^
WordCount.java:9: package org.apache.hadoop.util does not exist
import org.apache.hadoop.util.*;
And running CygWin on Windows? Tried everything for your classpath
huh? Try this:
$ javac -verbose -classpath C:\\cygwin\\home\\Rajat\\hadoop-0.20.1\\hadoop-0.20.1-core.jar -d wordcount_classes WordCount.java
(Change your cygwin path, obviously)
Use the -verbose flag to show the entire class search path.
1 Comment so far
Leave a comment
Thanks for solving issues.
We can solve these errors in many ways in windows.
1. copy the jar to the jdkhome\lib\ext folder. This is bootstrap classloader which loads all the jars automcatically by java .
2.other is set the environment variable CLASSPATH=%CLASSPATH%;.;HADOOP JAR LOCATION.
Please let us know if you think these options works for you.
Please click here for know more about hadoop
Introduction to Hadoop
Kiran @ What is Hadoop? recently posted..Top 10 gzip examples in unix or linux