Results 1 to 4 of 4
  1. #1
    shadowfax57 is offline Member
    Join Date
    Aug 2010
    Posts
    8
    Rep Power
    0

    Default Importing Packages

    Hello.

    A few weeks ago, I started a side project, and it pretty quickly grew out of hand. Long story short, I needed to separate a few of my files into separate packages for neater organization. I have one package that most of my files are in (which my NetBeans IDE refers to as <default package>), and I have a side package called CharClassTypes.

    Each class in CharClassTypes extends a class called PlayerCharacter inside the default package...or at least that was my plan. I'm having trouble finding the right line to import the default package in the subclasses.

    I know how to import normal API classes, because they mostly are of the form java.something.somethingElse. But what form should I use in this case?

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    The default package doesn't have a name so it's hard to import from.

    Move everything from the default package into a newly created package (with a name). NB should let you do this by dragging and dropping.

  3. #3
    shadowfax57 is offline Member
    Join Date
    Aug 2010
    Posts
    8
    Rep Power
    0

    Default

    Thanks for the suggestion. Worked out beautifully.

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

Similar Threads

  1. importing packages
    By mustachMan in forum New To Java
    Replies: 3
    Last Post: 01-20-2010, 06:07 AM
  2. help with importing packages
    By orrymr in forum New To Java
    Replies: 1
    Last Post: 08-07-2009, 09:18 PM
  3. importing packages at the same level
    By Bharat in forum New To Java
    Replies: 3
    Last Post: 03-30-2009, 04:17 AM
  4. importing external packages
    By bubbles in forum New To Java
    Replies: 3
    Last Post: 01-21-2009, 12:42 AM
  5. Replies: 3
    Last Post: 02-12-2008, 12:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •