程序员

Maven报错Please ensure you are usi

2017-02-20  本文已影响327人  Joepis

摘要: 原创出处 http://peijie2016.gitee.io 欢迎转载,保留摘要,谢谢!

在eclipse下用maven编译时,可能报以下提示

Please ensure you are using JDK 1.4 or above and not a JRE (the com.sun.tools.javac.Main class is required).

原因:eclipse默认是使用jre作为运行环境,而maven编译需要jdk作为运行环境。
因此,我们只要设置为jdk即可。

具体步骤:

这样就解决问题了。

上一篇 下一篇

猜你喜欢

热点阅读