Accepted answer

as you've discovered, you can't have a source folder inside another source folder, so before you can create src/main/java you have to tell eclipse not to treat src as a source folder. to do this, right click on the src folder and select build path -> remove from build path.

once you have done this src will appear in the folder tree in its normal place, so you can create the main and java folders under it, and move the existing src/com to src/main/java/com. finally right-click the newly-created java folder and select build path -> use as source folder.


simple solution would be create 'java' folder directly one the drive into src/main even before opening it in eclipse that way eclipse will not complain about the issue.


enter image description here

if you don't find the included path just add the path it will resolve.


solution one:

change the jre version to 1.8 and change it back to the original version (for maven-archetype-webapp, the original version is 1.7).

steps here

solution two:

check the jre option and maven dependencies option in "order and export".

steps here


remove the actual source folder definition in the build path and add a new source folder an name it src/main/java


the problem will be solved by checking on 'jre system library' and 'maven dependencies' checkboxs click ok. this is found in the project's 'build path option'


if the package structure is setup as, instead of com.inventica, that’s usually because under project properties > java build path > source, the source folder is setup as src instead of src/main/java. there’s no easy way to fix this, so remove src as a source folder and click ok.

now eclipse will show a folder hierarchy src/main/java. browse to the java folder > right-click > build path > use as source folder.

after this, you may have to fix the eclipse .project and .classpath files to have it use maven to manage dependencies, builds etc.

typically, you can copy this from a working project since there isn’t anything project specific here assuming you’re structured as a standard maven project.


open properties > java build path for the project. select the source tab and use add folders to add source folders.


i have solved this issue by below steps:

right click the maven project -> build path -> configure build path in order and export tab, you can see the message like '2 build path entries are missing' now select 'jre system library' and 'maven dependencies' checkbox click ok

Related Query

More Query from same tag