Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Java Missing required source folder: 'src'

Tags:

java

eclipse

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?

like image 912
sam Avatar asked Apr 12 '11 20:04

sam


People also ask

How do I fix missing src main java and src test java directory in the Eclipse maven web project?

Select project -> New -> Folder (not source folder) -> Select the project again -> Enter the folder name as (src/test/java) -> finish. That's it.

Why is src not showing in Eclipse?

Note: In case if you do not see the src/main/java and src/test/java directories in your project structure then you will have to go to Project ->Properties ->Java BuildPath ->Libraries after that select JRE System Library and click on Edit and Select or configure correct JRE System Library click on Finish and then click ...

Is missing required source folder java?

If you are facing an error with the folder, such as src/test/java or src/test/resources, just do a right click on the folder and then create a a new folder with the name being src/test/java. This should solve your problem.

What is src folder in Eclipse?

src is where Java IDEs (at least Eclipse and NetBeans) put the source files, it is pretty much standard, and the hierarchy of the folder inside it has to match your Java packages names.


4 Answers

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

This solved my problem.

like image 117
Fvergniaud Avatar answered Oct 14 '22 14:10

Fvergniaud


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/...

like image 41
Bozho Avatar answered Oct 14 '22 15:10

Bozho


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

like image 28
bkaid Avatar answered Oct 14 '22 15:10

bkaid


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!

like image 29
user358656 Avatar answered Oct 14 '22 15:10

user358656