IDEA中运行JAVA程序出现Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService问题
Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService问题)
看好我出现的这个问题是:Exception in thread “main” java.lang.NoClassDefFoundError。有很多人的问题是jdk的版本问题,和我出现的问题不一样。
解决办法:IDEA代码的configuration中「Include dependencies with “Provided” scope」打勾,然后apply-》ok。重新运行程序,就不会出现问题了。