Source folder is not on the Java build class path, creating Java package
Do it from the context menu of the "src" folder itself. The "Source folder" literally means a Source Folder as designated in the Java Build Path, not just some folder that happens to contain source. The Name field wants the actual, proper in the "this is what a .java file in it would declare", qualified package name. If you just wanted to create a new folder in there to then make some new .java files, you can just use the New Folder wizard.
EDIT: Also, keep in mind that the Package Presentation setting (set from the view's local menu--the upside down triangle) might be different between the Project and Package Explorer views. Adjust as you see fit if things look the opposite of how you'd like.
Source folder is not a Java project error in eclipse
In the maven project directory try
mvn eclipse:eclipse
that may do the trick.
Eclipse, Java from 2 src. folders?
I have tried same thing and its working for me.
See be tutorial Organizing sources
make sure setting is same as below:
Eclipse+Maven src/main/java not visible in src folder in Package Explorer
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 resources
and/or testResources
, those will be used instead. In general, Eclipse m2e synchronizes Eclipse's project source folder configuration with what's in your POM
.
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 main
and test
, just represented differently.
eclipse source folder is not java project, after importing project from git
If mvn eclipse:eclipse
does not work, you can try and specify manually the src folder, which will be recorded in the .project.
Check first if "Convert to Faceted Form" / Java would be enough.
Related Topics
Spring Kafka - How to Reset Offset to Latest With a Group Id
Gradle Java9 Could Not Target Platform: 'Java Se 9' Using Tool Chain: 'Jdk 8 (1.8)'
How to Link Feature and Step Definition in Cucumber
Changing Scene When a Button Is Pressed Fxml
Jdk Tools.Jar as Maven Dependency
Method to Find the Smallest Number from an Integer
Appbar Not Showing Back Button
How to Get an Http Response Body as a String
In Java How to Extract Exact Domain Name from Url
How to Use Limit in Spring Within SQL Query
Java Ssl: How to Disable Hostname Verification
How to Remove the Slashes from Json Key While Converting Object into String
Check If Two Objects Are Equal Excluding a Few Properties
How to Remove All Special Character in a String Except Dot and Comma
How to Exclude Classes from Test Coverage Using Java Annotations in Spring Boot