Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Eclipse folders appear as packages

I'm getting an issue where non-src folders are looking like packages, they look completely fine in my natural folder directory.

image

The assets folder should be a hierarchy, but isn't.

Thought it was because I was in package explorer but not project explorer, same issue with project explorer.

like image 690
DubyaDubyaDubyaDot Avatar asked Mar 08 '12 21:03

DubyaDubyaDubyaDot


People also ask

How do I show folders in Eclipse?

To view the project explorer, click on Window menu then, click on Show View and select Project Explorer. There is simpler way to open project explorer, when you are in the editor press alt + shift + w and select project explorer.

What does package mean in Eclipse?

It is a feature of Eclipse to organize and configure your different projects. A Java package is a language feature of Java. You can use them to structure your project and control visibility between different classes.

How do I fix package explorer in Eclipse?

You could try holding down Ctrl + F7 to see a list of all views, then up/down arrow to the View. If Package Explorer is in the list it has been minimised or something. If you select it and still can't see it, try Window → Reset Perspective... to restore all views to their defaults.


2 Answers

I believe, you right click on your project and choose "Build Path" and "Use as source folder". If it is the case, you can revert the problem by right clicking on your project and selecting "Build Path" and then "Remove from build path".

like image 58
sbegaudeau Avatar answered Oct 12 '22 07:10

sbegaudeau


For me the following worked (in RAD actually): Go to "Project Properties" / "Java Build Path" and mark the Resource Folder as "Source folders on the build path".

Project Window 1

The Resource Folder (here, src/main/resources) appears as filled with classless packages:

Classless packages appear

Enter the exlcusion pattern "**" to exclude any source path:

Project Window 2

This solves the problem.

Just folders now

like image 29
David Tonhofer Avatar answered Oct 12 '22 07:10

David Tonhofer