1、出现了Exception in thread “main" java.lang.UnsupportedClassVersionError。

是因为有较高的版本进行编译的Class文件在较低的虚拟机上运行。Eclipse配置了多个JDK,要求配置JDK统一。

要保证一下三处地方的jDK版本一致。

Maven使用过程问题

Maven使用过程问题

Maven使用过程问题

Maven项目出现Perhaps you are running on a JRE rather than a JDK?

No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

问题原因:eclipse官网看了看,发现eclipse默认是运行在jre上的,
但是maven插件需要使用jdk,因此需要在eclipse修改Installed JRES
位置在-->【Window】-->【Prefrences】-->【Java】-->【Installed JREs】
详见下图。

Maven使用过程问题

 

相关文章:

  • 2021-08-24
  • 2021-07-23
  • 2021-11-18
  • 2021-07-18
  • 2021-04-29
  • 2022-02-23
  • 2021-08-25
  • 2022-12-23
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2021-11-18
  • 2022-01-12
  • 2021-11-18
  • 2022-12-23
相关资源
相似解决方案