简体   繁体   English

如何将源代码导入eclipse

[英]How do i import a source code into eclipse

I have a folder called src and somehow i have to import it in to eclipse to work with the code. 我有一个名为src的文件夹,以某种方式我必须将其导入以使其与代码配合使用。 This is how it comes from github: 这是来自github的方式:

在此处输入图片说明

I've tried to put the src folder in an existing project still cant read it. 我试图将src文件夹放在现有项目中仍然无法读取它。 What should i do? 我该怎么办? Im not so familiar with java :/ The final jar file stuctures should look like this: 我对java:/不太熟悉:最终的jar文件结构应如下所示:

在此处输入图片说明

(its a bukkit plugin) (其bukkit插件)

File -> Import -> Maven -> Existing Maven Projects

And point it to the root folder of the projects (the one containing the top pom.xml). 并将其指向项目的根文件夹(一个包含顶部pom.xml的文件夹)。

You'll need a Maven plugin for Eclipse for this. 为此,您需要一个用于EclipseMaven插件

在Eclipse中:右键单击src->构建路径->用作源文件夹

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

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