错误信息:
[[email protected] HDFS_Java_API]$ hadoop HDFSJavaAPI.jar HDFSJavaAPIDemo Warning: $HADOOP_HOME is deprecated. Error: Could not find or load main class HDFSJavaAPI.jar
报错原因:
当前运行的 .class 文件不在 hadoop-env.sh文件中
解决办法:
在 hadoop-env.sh中配置HADOOP_CLASSPATH
export HADOOP_CLASSPATH=${HADOOP_HOME}/your_jar_path
ant编译后用hadoop报Could not find or load main class,布布扣,bubuko.com
时间: 2024-10-08 11:13:02