java项目导入时project,如何将缺少.project .settings .classpath文件的java项目导入到eclipse中...

I got a java source code from an opensource project. The source code doesn't have eclipse project specific files such as .project ,.classpath ,.setting(directory). How can I import that java source into eclipse ?

I don't have pom.xml(mvn) file to specify. So I tried manually.

followed the below steps to solve

Create a directory with the projectName and a directory "src" under projectName.

Move the source code ( ie: org/apache/hadoop directory) into src directory under projectName.

Create a sample project in eclipse and go the workspace and modify the .project xml file by changing the project name ,.settings ,.classpath files

Copy the modified ".project" file and ".settings" ,".classpath" from eclipse workspace project directory to the newly created directory "projectName/"

5 .Use eclipse import option under File menu to import the newly created project use Existing project into workspace option

Give the project root directory as projectName directory.

解决方案

if you are using maven type mvn eclipse:eclipse on project folder

if you are not using maven, go to eclipse, import->import -> general -> filesystem (then select your directory with source files)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值