How do I create the src/main/java
and src/test/java
in my default web application project in Eclipse without Maven? My current folder structure is
If the package structure is setup as src.main.java.com.inventica
, 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.
If you don't find the Included Path just add the path it will resolve.