Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Canada, Ontario, Mississauga
    Posts
    312
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to create Java package

    I use JBuilder in school to create a package then I create a class, easy as it sound.

    Right now, I don't have Jbuilder, I am using a DOS Java compiler, how do I create java package?

    Thank you

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Well a package is really nothing more than compiling your source files in a directory (make sure you refer to it in your class path) . The name of the directory will be the name of your package. And of course at the top of each file you will declare it to be in that package like so:

    package directoryname;

    and then in your main classes you would import the package

    import directoryname.*;
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Regular Coder
    Join Date
    Apr 2003
    Location
    Canada, Ontario, Mississauga
    Posts
    312
    Thanks
    0
    Thanked 0 Times in 0 Posts

    that's it?

    I thought there is more than that, any special layout of the directory at all?

    also, what is heavey weight and light weight for Java?

    Thank you

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,273
    Thanks
    4
    Thanked 83 Times in 82 Posts
    That's it.

    What do you mean by heavy weight and light weight?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

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