Eclipse Java Missing required source folder: 'src'

匿名 (未验证) 提交于 2019-12-03 01:49:02

问题:

I imported a jar file into workspace and this is the error I get:

Description Resource Path Location Type
Project 'Interpreter1' is missing required source folder: 'src' Interpreter1 Build path Build Path Problem

How can i get rid of this error?

回答1:

Right-Click Project --> Build Path --> Configure Build Path; unselect the SRC, save, select again.

This solved my problem.



回答2:

Go to the Build Path dialog (right-click project > Build Path > Configure Build Path) and make sure you have the correct source folder listed, and make sure it exists.

The source folder is the one that holds your sources, usuglaly in the form: project/src/com/yourpackage/...



回答3:

Right Click Project -> New -> Folder -> Folder Name: src -> Finish



回答4:

Here's what worked for me: right click the project-> source -> format After that just drag and drop the source folder into eclipse under the project and select link.

good luck!



回答5:

Edit your .classpath file. (Or via the project build path).



回答6:

Create the src folder in the project.



回答7:

I was confused by this for hours.

Right click on project -> Build Path -> Configure Build Path -> Add Folder



回答8:

In eclipse, you must be careful to create a "source folder" (File->New->Source Folder). This way, it's automatically on your classpath, and, more importantly, Eclipse knows that these are compilable files. It's picky that way.



回答9:

One of the build path issue is it cannot find the correct /src/conf source folder. Right click on each project, Build Path > Configure Build Path. Under the Source tab, remove the folder with a red cross icon on the bottom right. It will work for the situation that there is a small red exclamation mark “!“ bedore your project name!



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!