Eclipse filters out folders that are marked as source from the "raw" folder path. That is, they are visible only as source folders:
If you can't see them in either place, then they
- are either filtered out in the settings: check your settings for Package Explorer (the Package Explorer bar, downwards menu arrow -> Filters...)
- or they were created externally and Eclipse haven't noticed them: Refresh your project in this case.
- or they don't exist: right-click on the project, select New->Folder and input the path, e.g.
src/test/java(not "Source Folder"). After you use Maven->Update Project... on the project, they will be automatically added as source folders, provided you have the default configuration.
Now, as I said, those folder will only be used as source if you preserved the default configuration in your
POM. If you defined other
testResources, those will be used instead. In general, Eclipse m2e synchronizes Eclipse's project source folder configuration with what's in your
EDIT: maybe this is unclear - see those folders at the top? The ones labeled with the /-separated paths? These are your folders. These are the same folders that you would expect to find in
test, just represented differently.
This error happens when there are no files inside /src/main/java Just make some empty files inside and the problem will go away.
A side note: lots of version control systems (mercurial for example) do not commit folders if there are no files inside.
After creating the project go to properties --> build path --> configure build path --> order and export tab and check jre and maven dependencies. You will then have the folder.
Right click on eclipse project go to build path and then configure build path you will see jre and maven will be unchecked check both of them and your error will be solved
My problem was kind of the same at first and then a little different in the sense that when
/java folder showed up, it was deep down in a nested folder somewhere in
Initallially the problem was being in the
Package Explorer and not in the
Project Explorer as many people have talked about. So,
- a. right-click on your project root
- b. show in, and select
However, the main problem was I missed to notice a checkbox at the second step of
Maven Project Creation from the wizard. That got me created a complicated structure and not a clean direct one.
Once I marked it
checked I got a clean project structure as what asked.
I was also facing the issue but I open POM xml file and keep it open. Wait for some time till maven read pom then Automatically it will come.
I used this tutorial to create my maven web project http://crunchify.com/how-to-create-dynamic-web-project-using-maven-in-eclipse/ and eclipse did not create src/main/java folder for me. When i tired to create the source folder src/main/java eclipse did not let me. So i created the folder outside eclipse in the project directly and then src/main/java appeared in eclipse.
I was not able to see the build path option in the properties as well. Also the
was not visible in
Project Explorer. below solution worked for me
- Go to Project root
- Select "Project facets" from Properties
- Check "Java"
This fixes the issue
If none of the answers worked for you. You might be in the wrong "Window". I was in "Package explorer" and switching to "Project Explorer" showed me the 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 Now you can see below in all type of Explorers (Package or Project or Navigator)
Right click the Maven Project -> Build Path -> Configure Build Path Go to 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
I had a similar issue when I checked out a web project from a github repo on my eclipse. src/main/java was directly inside the project root in Package Explorer. My expectation was that src/main/java be visible inside a source folder "Java Resources". There were few things which I did to achieve this.
- Right click on Project > Build Path > Configure Build Path..
- Select filter "Java Build Path" and click on Tab "Libraries" Verify your "JRE System Library". If it is not pointing to your latest JDK, then you can click on Edit Button and follow the subsequent dialog boxes to select most appropriate JDK home path in your system. Once done click Apply, Apply and Close, Finish to close all the associated open boxes for the current filter.
- Select filter "Java Compiler" and ensure your JDK Compliance points to correct JDK. Click Aapply
- Select filter "Project Facets". Ensure both Java and Dynamic Web Module is selected with correct version.
- Click Apply and Close.
- Source folder "Java Resources" gets created with src/main/java in it when viewed in Project Explorer.
Navigate > Show In > Package Explore
After 2 hours of trying everything...
Just go on
show view ->
and in project explorer you can view of all files solution
I had the same problem, I changed my Eclipse project view from Package explorer to Project Explorer.
If you are looking for Simple/quicker way, you can follow this solution.
Right click on your project.
> Build Path > Configure Build Path > Java Build Path
- Goto '
Source' tab, there, you can see like
- Click on it and remove.
- Click on
Apply and Close.
- Now, right click on project and
>New > Source folder > add source folder "src/main/java".
happy learning and do not forget to upvote :)
I used to get the same problem, but solved it by pointing to the right jre used for the project.
Right click on the project properties java builpath see the jre selected edit it select alternate jre installed jre select the right one ok After changing right click on project>maven>update project
Hope it helps. Attaching screen shot.
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
Now you can see below in all type of Explorers (Package or Project or Navigator)
src/main/java src/main/resources src/test/java
- Eclipse+Maven src/main/java not visible in src folder in Package Explorer
- How do I put a folder with java files into eclipse's package explorer
- Eclipse Package Explorer not matching physical folder structure
- Eclipse does not show java folder in src folder (gradle)
- Java Error: Could not find or load main class. (Eclipse Juno) with package
- src folder not added to Java Classpath in eclipse
- Create a new java package in eclipse (apart from default package), but can not use the class from external library in the files in this new folder
- Android Eclipse - package folder not "normal" in src folder
- Why does Eclipse Java Package Explorer show question mark on some classes?
- In Eclipse, what can cause Package Explorer "red-x" error-icon when all Java sources compile without errors?
- "Source folder is not a Java project" error in eclipse
- Adding folder in eclipse in src directory without making it package
- Package explorer not showing...packages, in Eclipse. How to fix it?
- Java launch error selection does not contain a main type
- Eclipse does not display /target/classes folder in "project explorer view"
- SRC folder in Eclipse is empty (MainActivity class not created) after creating a new android project using Eclipse
- Eclipse does not refresh project files in package explorer view
- Eclipse showing java project src folder view as all packages and subpackages
- Eclipse Java OpenCV unsatisfiedLinkError in Test src folder only
- Running Ant Build.xml getting: Java Virtual Machine Launcher: Could not find the main class. Program will exit
- Why does Eclipse open my java files as a tab in the package explorer view?
- Ant javac: package x does not exist, but i added the x.jar to the java build path libraries
- Eclipse - cant add jar to build path. jar is inside the lib folder of project, but not visible
- Eclipse Java EE IDE not supporting javax.servlet package
- How to fix the error: test source folder 'src/test/java' in project must have an output folder that is not also used for main source"?
- How to automatically open folder location in package explorer corresponding to the viewed .java
- What does an orange square by folder in Package Explorer mean?
- Method does not override package visible method in Eclipse
- Why does Eclipse Java Package Explorer use the System Font?
- eclipse source folder is not java project, after importing project from git
More Query from same tag
- Eclipse Luna content assist not working when certain classes present
- Eclipse Maven Integration archetype is not on the list
- How to Pass Spinner Objects to other activity in Android/Java
- Eclipse putting each parameter on new lines, how to stop this formatting
- Eclipse got hung when opening junit test case
- Eclipse ADT not generating MainActivity
- If I debug JSF webapp it gives me SOURCE NOT FOUND
- Map external directory outside tomcat installation in eclipse Dynamic Web Project
- how to enforce eclipse to use java 1.5 version
- Eclipse C constants defined in header could not be resolved
- How to check if a record exist in database or not in sqlite?
- Environment variables in Eclipse on OSX
- How to make a multiline file into a single line file delimited with a control character
- In Eclipse, way to change the background color of side panes (Package Explorer, Task List, Outline, etc)
- Eclipse doesn't show output from multiple methods?
- Getting parsing error in xml
- Syntax highlighting of Vagrantfiles using Eclipse: Ruby Development Tools
- creating a jar for a project in Eclipse
- Difficulty in Installing Windows Azure Access Control Services filter plugin for java in eclipse
- Building workspace creating a prob in eclipse for android app
- Eclipse Plugin: Jump to a Line by adding Hyperlink to a row in SWT Table view
- Can you easily take a C++ project back and forth between Qt Creator and Eclipse?
- How to extend Eclipse's Java editor to recognize my own elements
- Error in Jasper Report
- Out of heap space when moving project to a different computer?
- How to ignore a line in xmlUnit
- What's my current cursor position?
- How to combine 2 Android projects on eclipse?
- Eclipse console text colors for black theme hardly readable
- maven build succeeds, but eclipse build fails