idea导入eclipse的java项目,idea中导入Eclipse项目及报错处理方法

一、idea中导入Eclipse项目

1、打开Eclipse项目的目录结构,清除Eclipse中的依赖文件,只保留src和pom文件

b739ae09d5f6?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

b739ae09d5f6?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

2、idea中,选择file->open->Open File or Project中选择需要导入的eclipse项目,导入项目完成。

b739ae09d5f6?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

二、导入完成后,执行idea时报错

(一)无效的源发行版"

解决方法:

1、确认自己程序使用的JDK版本

在file->project structure->Platform Settings->SDKs中查看

b739ae09d5f6?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

2、在file->project structure->Modules->Sources中设置language level是8或8以下。即语言级别不能高于你安装的版本。

b739ae09d5f6?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

(二)Information:java: javacTask: 源发行版 1.8 需要目标发行版 1.8

解决方法:

在file -> settings -> build,exception,deployment -> compiler -> java compiler 中将模块的target bytecode version改为1.8。

b739ae09d5f6?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值