score:183
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.
score:0
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.
score:1
score:2
Remove the actual source folder definition in the build path and add a new source folder an name it src/main/java
score:2
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'
score:2
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.
score:6
Open Properties > Java Build Path
for the project. Select the Source
tab and use Add Folders
to add source folders.
score:14
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
Source: stackoverflow.com
Related Query
- 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
- PouchDB with Windows Java development
- Private field in parent class shadowed/hidden by subclass - inspections to catch it
- How can I install jdk 1.6 without admin rights?
- Creating folder in file-explorer using DDMS perspective
- How to make a vertical, collapsible menu in GWT?
- Implement an Interface for multiple classes in Eclipse Java
- eclipse c/c++ not compiling source code in sub folders
- Eclipse: Project Explorer: "Top level elements to working sets but no workings sets defined"
- Regular Expression to find bad words in code comments
- Want to create a table using org.eclipse.swt.widgets.Table, working on a pugin project
- How to integrate the Vitamio library in my project android?
- Possible to open an eclipse project from external application?
- notepad.exe is not opening in tomcat but works in eclipse
- Is Oracle ADF Essential and OEPE Eclipse is discouraged by Oracle?
- Eclipse does not show WildFly in server libraries
- How to generate camelized getters and setters in Zend Studio 7 (for Eclipse)?
- Jersey REST API: java.lang.NoSuchMethodError: org.glassfish.jersey.message.filtering.EntityFilteringFeature.enabled
- Maven compilation fails with "cannot find symbol" while with Eclipse, it compiles
- IDE CVS checkout from a tag
- Can't get compile on save / hot deploy feature to work with maven based webapp in eclipse or netbeans
- Eclipse for Mac OS X
- How do I import the samples from the developer.android website?
- Changing the property of an imported class in eclipse
- Unable to access java web application with windows server static ip
- Not able to automate desktop application using sikuli
- SonarLint is super slow
- Spring Boot Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test
- Can Clone my Git Repository but can't commit and push
- Designate an arbitrary folder as Android assets?
- How to change workspace JRE in Eclipse