Reputation: 1739
I have just copied the WordCount.java
source code from the examples directory and I am trying to compile it. But I am getting the error
WordCount.java:61: error: cannot access Options
String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs();
^
class file for org.apache.commons.cli.Options not found
1 error
I have not changed anything in the code.
Upvotes: 2
Views: 3509
Reputation: 508
Add commons-cli-1.2.jar to your project. Right-click on your project and choose build path -> configure build path and then choose the library from Hadoop-2.5.0-cdh5.3.2\share\hadoop\common\lib.
Upvotes: 0
Reputation: 11
hadoop common cli is present in the lib folder.
Please go through the following command:
javac -classpath hadoop-core-1.0.3.jar:lib/commons-cli-1.2.jar -d tmp/playground/classes tmp/playground/src/WordCount.java
Upvotes: 1
Reputation: 621
Add commons-cli-1.2.jar
to your classpath. Download it from Apache link if you don't see it on your local machine.
Upvotes: 5