简体   繁体   English

将现有程序中的源代码文件夹导入Eclipse

[英]Import source code folder from a existing program into Eclipse

I just wanted to edit a existing program (or project) where I have the source code folder (which has already java files, not class files... so I don't have to decompile that) of that. 我只想编辑一个已有的程序(或项目),其中有我的源代码文件夹(已经有java文件,没有class文件了,所以我不必反编译)。 But how do I import that in Eclipse? 但是,如何在Eclipse中导入呢?

Screenshot: 屏幕截图:

屏幕截图

You have a maven build file ( pom.xml ), then it's pretty easy: do a mvn eclipse:eclipse on the pom file. 您有一个maven生成文件( pom.xml ),这很简单:在pom文件上执行mvn eclipse:eclipse That will create a project at that location (iaw, it will create a .project and a .classpath file). 这将在该位置创建一个项目( .classpath ,它将创建一个.project.classpath文件)。

Then, simply import the project into a workspace. 然后,只需将项目导入到工作区中。

With Neon: File > Open projects from filesystem... . 使用Neon: File > Open projects from filesystem... With older versions or if you prefer it in Neon, File > Import > Maven > Existing Maven Projects . 对于较旧的版本,或者如果您希望在Neon中使用它,请选择File > Import > Maven > Existing Maven Projects

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM