package org.apache.hadoop.conf does not exist after setting classpath

怎甘沉沦 提交于 2019-12-05 04:13:54

The CLASSPATH variable is the way to tell applications, including the JDK tools(javac), where to look for user classes.

You can set this variable as given below and try compiling the class.

export CLASSPATH=$CLASSPATH:/Users/oladotunopasina/hadoop-1.2.1/hadoop-core-1.2.1.jar

If you are using a build tools such as Maven, Gradle, sbt, etc.

You have to add the dependency plugin to your build file.

For Maven,per example, you have to add the following into your pom.xml

<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-core</artifactId>
    <version>1.2.1</version>
</dependency>

You can find the dependency settings for other build tools here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!