Error content: org.apache.hadoop.io.nativeio.nativeio $windows.createdirectorywithmode0 (ljava/Lang/string; I)
1. There is a problem with the downloaded Hadoop/bin,
Refound some winutil.exe related to Hadoop/bin, and then replaced the old one and tried again. It was really successful!!!
Make sure the version is similar!!!
My Hadoop version of Linux is 3.1.4. Later, when connecting, I need to configure windows, which is 2.6.0. Then I keep reporting errors, so I changed it to 3.0. Be sure to choose a version similar!!!
2. Add static code blocks
static { try { System.load("D:\\install\\winutils-master\\winutils-master\\hadoop-3.0.0\\bin\\hadoop.dll"); //We recommend using the absolute address, the path to the hadoop.dll file in the bin directory } catch (UnsatisfiedLinkError e) { System.err.println("Native code library failed to load.\n"+ e); System.exit(1); } }