Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Having Trouble With Packages
Having Trouble With Packages [message #1404674] Mon, 04 August 2014 23:07 Go to next message
Yarin Cohen is currently offline Yarin CohenFriend
Messages: 2
Registered: August 2014
Junior Member
Hey everyone Smile

I'm having trouble with Java packages.
Whenever I create a sub package to a package I have, instead if putting it under the super package it puts it besides it, and names it <super package name>.<package name>

For example:

I have a super package named "LearningModding" that has classes of its own. I added a few sub-packages that have classes of their own too: confing and proxies.
Instead of putting "config" and "proxies" packages below the super package, it named them "LearningModding.config" and "LearningModding.proxies", and put them in the same level as the super package.

I tried everything to make it work. (Currently I'm learning how to mod a Minecraft mod. I'm following a YouTube guide. He uses Eclipse too, and in his videos the packages are under their supers.)

Thanks Smile
Re: Having Trouble With Packages [message #1404770 is a reply to message #1404674] Tue, 05 August 2014 15:31 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
two comments:

- semantically speaking, Java does not have a concept of "super packages", which would "contain" "child packages". The fact that package names are mapped to nested directories in the file system is a purely organizational issue.

- in JDT's Package Explorer you can choose between two "Package Presentations": "Flat" vs. "Hierarchical".

S.
Re: Having Trouble With Packages [message #1404774 is a reply to message #1404770] Tue, 05 August 2014 16:16 Go to previous message
Yarin Cohen is currently offline Yarin CohenFriend
Messages: 2
Registered: August 2014
Junior Member
Thank you so much!

And thanks for the comments Smile I just wasn't sure how to call them besides sub packages and super packages, now I know that thses aren't the proper names Smile

Problem resolved Smile
Previous Topic:Eclipse Kepler/Luna & Maven
Next Topic:Dynamic Web Service
Goto Forum:
  


Current Time: Mon Dec 09 14:23:26 GMT 2024

Powered by FUDForum. Page generated in 0.03225 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top