Hadoop报错java.lang.UnsatisfiedLinkError:org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String; I)Z

环境

Windows10 + IDEA2020.2专业版 + JDK8 + Hadoop2.6.0

报错信息

1
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z

image-20201203195244987

解决方案:

  1. 下载hadoop.dll点此去下载
  2. 以下方案依次尝试
    1. 放在hadoop根目录的bin目录下(本人实测,cmd命令行运行打包好的jar包需要这个)
    2. 放在c:/windows/System32下(IDEA需要这个)

参考:

  1. hadoop报错 java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Lja