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

后端 未结 30 2616
盖世英雄少女心
盖世英雄少女心 2020-11-22 15:40

I\'m compiling a project in Eclipse using m2eclipse. I set the JDK path in Eclipse like this:

Windows-->preferences-->installed jres--> jdk1.7.xx  p         


        
30条回答
  •  鱼传尺愫
    2020-11-22 16:05

    There are several options to specify.

    Steps: Right on project in project explorer Go to Run-> Run Configuration -> Click Maven Build -> Click on your build config/or create a new config. You will see the window as the given snapshot below, click on JRE tab there.

    You see you have 3 options 1) Workspace Default JRE 2)Execution Environment 3)Alternate JRE 1) Workspace Default JRE is set from 'Window' menu on the top -> Preferences -> Java -> Installed JREs -Here you can add your jdk 2) Execution Environment jdk can be set in pom.xml as mentioned by @ksnortum

    
    
        
            maven-compiler-plugin
            3.1
            
                true
                C:\Program Files\Java\jdk1.7.0_45\bin\javac.exe
            
        
    
    

    3) Alternate JRE can be used to select a jdk from your directory

提交回复
热议问题