Eclipse: JRE System Library in Java Build Path reset

前端 未结 1 1616
悲哀的现实
悲哀的现实 2021-02-13 04:30

For developing a JavaFX application I\'m using a 4.3.1 snapshot of eclipse together with JDK 8 build b116. In my workspace projects the JRE library inclusion in the build path

1条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-13 04:35

    The maven eclipse plugin (m2e) selects a java execution environment depending on the and properties for the maven compiler plugin.

    The problem is that there is neither a 1.8 execution environment available in Kepler nor the m2e maven compiler connector can map it yet.

    Thus I see two solutions until it is supported in Kepler and m2e:

    1. Let maven change the environment to 1.4 and map your 1.8 JDK to the execution environment J2SE-1.4. Then your project will use the correct JDK. But then all projects that depend on 1.4 will use the 1.8 JDK of course.

    2. Use the pluginManagenent to turn off the maven-compiler-plugin lifecycle handling. This should prevent the m2e plugin from updating the execution environment and you can set it manually.

      
          
              
                  org.eclipse.m2e
                  lifecycle-mapping
                  1.0.0
                  
                       
                             
                                   
                                       
                                             org.apache.maven.plugins
                                             maven-compiler-plugin
                                             [1.0.0,)
                                           
                                               compile
                                           
                                       
                                       
                                            
                                       
                                   
                             
                       
                 
             
          
      
      

    0 讨论(0)
提交回复
热议问题