在搭建好Hadoop Eclipse开发环境后,编写map-reduce,遇到如下的问题:

The type org.apache.commons.cli.Options cannot be resolved. It is indirectly referenced from required .class files

从字面上可以看出,工程缺少org.apache.commons.cli.Options,这个包被间接的被其他包使用,根据经验推断,这个应该是缺少$HADOOP_HOMT/lib下的某一个包,通过不断的尝试,发现是缺少了commons-cli-1.2.jar包,

The type org.apache.commons.cli.Options cannot be resolved. It is indirectly referenced from required .class files

通过Java Build Path设置后,恢复正常。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-11
  • 2021-10-07
  • 2019-09-28
  • 2021-07-10
  • 2021-09-28
相关资源
相似解决方案