Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 863035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T09:14:35+00:00 2026-05-15T09:14:35+00:00

In Eclipse 3.5, say I have a package structure like this: tom.package1 tom.package1.packageA tom.package1.packageB

  • 0

In Eclipse 3.5, say I have a package structure like this:

 tom.package1
 tom.package1.packageA
 tom.package1.packageB

if I right click on an the tom.package1 package and go to Refactor->Rename, an option “Rename subpackages” appears as a checkbox. If I select it, and then rename tom.package1 to tom.red my package structure ends up like this:

tom.red
tom.red.packageA
tom.red.packageB

Yet I hear that Java’s packages are not hierarchical. The Java Tutorials back that up (see the section on Apparent Hierarchies of Packages). It certainly seems like Eclipse is treating packages as hierarchical in this case.

I was curious why access specifiers couldn’t allow/restrict access to “sub-packages” in a previous question because I KNEW I had seen “sub-packages” referenced somewhere before.

So are Eclipse’s refactoring tools intentionally misleading impressionable young minds by furthering the “sub-package” myth? Or am I misinterpreting something here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T09:14:36+00:00Added an answer on May 15, 2026 at 9:14 am

    Java packages are not hierarchical in the sense that importing everything from package A does not import everything from package A.B.

    However, Java packages do correspond directly to the directory structure on the file system, and directories are hierarchical. So Eclipse is doing the correct thing – it is renaming the directory, which automatically changes the name of the parent directory of the renamed directory’s children (to state the very obvious).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Eclipse's Package Explorer, let's say I have a list of packages like this:
In Eclipse 3.3.2, I would like to replace a character (say ',') by a
first of all, i like to say that i have read the other two
Say I have a search string like: Hello [NAME], how are you today? I
I have added locations into Eclipse so I can, say, create projects from SVN
I feel like I'm missing something very simple here. I have Eclipse set up
I'm trying to add two folders to my eclipse project's classpath, let's say Folder
(Eclipse 3.4, Ganymede) I have an existing Dynamic Web Application project in Eclipse. When
In Eclipse, I can switch through open editors using control-page up/down. This works great,
In Eclipse, I have a workspace that contains all of my projects. Each project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.