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
java folders under it, and move the existing
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.
remove the actual source folder definition in the build path and add a new source folder an name it
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
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.
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
- Creating a src/main/java folder structure in Eclipse without Maven
- Does creating a folder in default maven directory structure offered by eclipse lead to any issues?
- Share src folder between two Java Dynamic Web project under Ear Project Structure Eclipse
- Creating a java application with a mainClass using Maven in Eclipse - 'Could not find the main class'
- Adding folder in eclipse in src directory without making it package
- SRC folder in Eclipse is empty (MainActivity class not created) after creating a new android project using Eclipse
- Is it possible to use sysout without class and main method in Eclipse IDE using Java 9?
- Double source folder in eclipse when creating new maven project
- Import maven project in eclipse - folder structure not as expected
- Eclipse showing java project src folder view as all packages and subpackages
- Eclipse Java OpenCV unsatisfiedLinkError in Test src folder only
- How to debug a plugin in Eclipse - i.e. a Java project without a Main method
- Environment for java + scala + lift project in eclipse without maven
- Export a Java project without main method (with external jars) to Jar in Eclipse
- Creating a Webservice based on Java EE 6 using Maven 3 on Eclipse IDE
- Converting Eclipse project to Maven without losing structure
- How to run a Java 9 main class in Eclipse without editing a launch-configuration?
- Java Eclipse Maven Could not find or load main class with jdk
- Folder structure in GitHub for my Eclipse Maven project
- Multi module maven project is not showing in package structure but as folder structure in eclipse
- How can I only search java class in main source folder (exclude test folder) in eclipse
- Maven layout Structure creation. Only resource folder is visible, no Java folder created
- Read a file's content from the expression of a conditional JAVA breakpoint in Eclipse without creating variables
- How Eclipse (IDE) can run main method in Java without a public class?
- Eclipse does not show java folder in src folder (gradle)
- Eclipse vs Netbeans Maven Folder Structure
- When Importing Java Project Directory, eclipse is not properly creating sub directories for bin and SRC
- Test cases in new folder created parallel to src/test/java in latest Eclipse IDE maven java project is not executing the test cases
- Eclipse gives an empty src and assets folder after creating a new android application project
- How to connect/sync just the src folder of the maven project in eclipse workspace to src folder in repository
More Query from same tag
- Loading game onto Android with LibGDX throws NoClassDefFoundError: menu.StateManager
- Deleting Files in Eclipse causes every image to be wrong
- JVM_Bind when running OSGi application from Eclipse
- Setting a eclipse plug-in to singleton when creating a plug-in project via IPluginContentWizard interface
- Runtime Directory in Android Project
- Is it necessary to use a toolchain to compile a Kernel?
- How to remove directories from final build zip archive using maven 3
- Regarding help on artoolkit for android and windows
- Unknown entity when running junit test
- Stuck at spring tutorial
- How to enable sample based profiling of Android on Eclipse?
- Eclipse shutdown when creating unsigned android apk
- GWT Eclipse wont compile classes into war/WEB-INF/classes
- JARs from library project are not visible in application projects
- How to add hibernate javadocs in Eclipse?
- Java swing timer not decrementing the right way and not starting at the correct hour
- debugging with PaX+Linux+Eclipse, executing script after build to remove PaX protections
- jooq configuration input parameter on call sp
- Cant upload APK, failed because no AndroidManifest.xml found
- Passing XSL file in classpath to XSLT Transformer
- How do I turn off or remove Android Visual Layout Editor?
- Android/Eclipse: how can I add an image in the res/drawable folder?
- Android emulator difficulties
- Exception error when I try to run testng file from the command line
- I cant find usb driver for GigaByte gsmart tuku t2
- Using sqlite database and it force closes
- Add embedded plugin jar file to a project
- How to find hidden jar in classpath?
- Consider adding android:paddingStart="25dp" to better support right-to-left layouts Error
- Run executable file in linux - not working