...

View Full Version : how to create Java package



weronpc
02-01-2004, 08: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

Spookster
02-01-2004, 09: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.*;

weronpc
02-04-2004, 05: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

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

What do you mean by heavy weight and light weight?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum