1
votes

So I just installed Hadoop using homebrew (brew install hadoop), and I'm trying to use the Java API (http://archive.cloudera.com/cdh/3/hadoop/api/index.html). When I import for example:

import org.apache.hadoop.fs.Path;

The compiler just tells me that the package does not exist. Does anyone have any idea how to get these packages to import correctly? My JAVA_HOME='/usr/libexec/java_home' so I don't know what could be the problem.

Thank you!

1

1 Answers

1
votes

You need to include hadoop-core*.jar in your java class-path to import org.apache.hadoop.fs.Path. This jar file is present under $HADOOP_HOME and the exact name of the jar file may vary depending on the hadoop distribution and verison.