JRE System Library Problem J2SE-1.5问题

(1)问题:

Description Resource Path Location Type Build path specifies execution environment J2SE-1.5. 

There are no JREs installed in the workspace that are strictly compatible with this environment. 

WinXin Build path JRE System Library Problem


(2)原因:

maven是项目管理工具,默认使用J2SE-1.5的库管理项目(我的是1.5,也可能是其他版本),

maven-compiler-plugin插件,就是为了告诉maven使用什么版本的库来管理项目。

(3)解决办法:

1.在pom文件中加入以下代码

<build>
    <finalName>WinXin</finalName>
    <plugins>  
        <plugin>    
        <groupId>org.apache.maven.plugins</groupId>    
        <artifactId>maven-compiler-plugin</artifactId>    
        <configuration>    
            <source>1.8</source>    
            <target>1.8</target>    
        </configuration>    
        </plugin>  
      </plugins>  
  </build>

2.更新项目

右键项目/maven/update project/勾选 force update of snapshows/releases


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值