【IDEA】碰到 [ 打开IntelliJ IDEA 源值1.5已过时,将在未来所有版本中删除 ]解决方案

博客介绍了idea每次运行项目时提示源值1.5已过时且将在未来版本删除的解决办法,包括在maven的setting中设置、在项目pom.xml文件内添加配置,还需检查setting中编译版本,将Java compiler设置成当前jdk版本,并给出参考博客链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

idea每次运行项目时都提示源值1.5已过时,将在未来所有版本中删除的解决办法

1:在maven的setting中设置如下:

<profile>
        <id>jdk-1.8</id>
        <activation>
            <activeByDefault>true</activeByDefault>
            <jdk>1.8</jdk>
        </activation>
        <properties>
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
            <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
        </properties>
</profile>

2.在你的项目pom.xml文件内加上配置如下。

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

3.检查你的setting中编译版本是否设置为当前版本?
          找到 Java compiler 设置成你的jdk版本


参考博客:
https://blog.youkuaiyun.com/wu_ri_san_xing/article/details/73013573
https://blog.youkuaiyun.com/hcwbr123/article/details/54693197
https://blog.youkuaiyun.com/mulinsen77/article/details/86165887

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值