My Eclipse Java package is treated as a folder; can anyone suggest what\'s wrong?
I have faced the same issue and found the solution, as to add Java Nature
in .project
file of the current application.
Project natures are used in the Eclipse IDE in order to configure projects in the workspace. One project may have several project natures. The most popular project nature is org.eclipse.jdt.core.javanature, which is used to indicate that a project is a Java project.
Add org.eclipse.jdt.core.javanature
and its corresponding builder in the .project
file of an application as shown below:
MyJavaApplication
org.eclipse.jdt.core.javabuilder
org.eclipse.jdt.core.javanature
Project view as Package structure:
Projects and its dependent modules as Hierarchical structure.
Package Explorer / View Menu / Package Presentation... / Hierarchical