DannyR DannyR - 6 months ago 48
Java Question

eclipse package with dot not representing directory structure

In Eclipse you can created a package name with dots in it.

I.e danny.com.app

I would have thought this would create a directory structure of app/com/danny, but eclipse create a package name call danny.com.app with with no directory structure representing this

Please can some explain this to me




Of course, package names always go "a.b.c"

I guess: your package is simply empty so far. I think that some settings control if eclipse creates an empty directory as soon as you create a package.

Thus: see what happens when you add something into that package. I am pretty sure eclipse will then create the a/b/c directory in your filesystem.

But maybe your problem is that you are using the eclipse package view to look at your project.

Thing is: eclipse has different views that you can use to inspect your project. The package explorer ... shows packages, whereas the file explorer shows the actual file system folders, contents.