Eclipse/Maven error: “No compiler is provided in this environment”

前端 未结 24 1509
庸人自扰
庸人自扰 2020-11-27 04:36

I am a relative newcomer to the world of Java enterprise development. My organization\'s Java guru is out on indefinite family leave, and I have been assigned the task of m

24条回答
  •  时光说笑
    2020-11-27 05:13

    When I was runing mvn compile, I was getting below error in console:

    [INFO] Changes detected - recompiling the module!
    [WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
    [INFO] Compiling 1087 source files to C:\Code\DevVNextComplete\Development_vNext\Source\JARS\target\classes
    [INFO] -------------------------------------------------------------
    [ERROR] COMPILATION ERROR :
    [INFO] -------------------------------------------------------------
    [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
    [INFO] 1 error
    

    [Resolution]

    I had added, the JAVA_HOME variable in my environment variables and then it worked.

提交回复
热议问题