关于使用HBase-1.3.1版本 API  运行时出现  Exception in thread "main" java.io.IOException: java.lang.reflect.InvocationTargetException 异常的原因和解决方案


一 现象

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

二 原因 

HBase-1.3.1版本和JDK版本不匹配,可以使用JDK1.7或者JDK1.8

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException 

三 解决办法:改JDK版本 

        (0)安装JDK1.8或者JDK1.7版本,要记得安装路径,等一下要用,比如我的安装路径是:

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

        (1)点击Window下的Preferences

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

        (2)添加JDK1.8或者JDK1.7的根目录

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

        (3)添加JDK1.8或者JDK1.7

              a)

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

               b) 点击Directory找到你刚刚JDK的安装目录

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

              c)上一步完整之后,点击Apply and Close

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

        (4)修改当前项目的jdk

              a)

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

              b) 

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

              c)

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException 

              d)

Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException 

              e)选择JDK1.8或者JDK1.7

 Exception in thread “main“ java.io.IOException: java.lang.reflect.InvocationTargetException

              f)最后点击Apply and Close ,然后重新运行程序就没问题啦!!! 

相关文章:

  • 2021-04-22
  • 2021-09-09
  • 2021-11-08
  • 2021-09-11
  • 2021-10-10
  • 2021-11-12
  • 2021-07-23
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2022-01-21
  • 2021-06-29
  • 2022-12-23
  • 2021-11-29
  • 2021-10-14
相关资源
相似解决方案