View Full Version : how to create Java package

02-01-2004, 09:38 PM
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

02-01-2004, 10:23 PM
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.*;

02-04-2004, 06:57 AM
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

02-04-2004, 04:31 PM
That's it.

What do you mean by heavy weight and light weight?