今天在IDEA上打包成jar包部署到服务器上时,遇到了一个报错,写个博客记录一下
具体如下:Exception in thread "main" java.lang.UnsupportedClassVersionError: com/atguigu/mr/wordcount/WcDriver has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
解决方案:我的是服务器上的jdk版本与Windows的jdk版本不一致,Windows上的JDK版本更高。解决方法:在maven下的pom.XML配置Linux中的JDK版本就解决了。仅供参考
代码如下
UTF-8 8 8 4.0.0.RELEASE



