Not sure of how to describe my issue
I am using NetBeans for my java class. I am trying to run the ever popular inventory program. My issue may be elementary, but I am still not quite grasping it. I am apparently not compiling it correctly. I set up three programs (?) - "Inventory", "Products", and "TestDriver". My instructor is telling me to compile them together. How do I do that? I have each one in its own program.
Should I have set them up together in one window? Is there a different option on NetBeans to have them 'packaged' together but not on the same page?
I hope I explained it well enough to enlist some help!
Thank you!
[629 byte] By [
4zlimita] at [2007-11-27 8:13:32]

Forgive me if this is a stupid question, but how does it pull the other programs in? If I set TestDriver as the main method, how will it pull Inventory and Product coding in?
well i am sure your other classes are connected to each other. so if you create an instance of any one of the class in your main method.
Example
i have three classes. each connected to one another like one class(PhoneNumber) Another one(ArrayPhoneNumbers) and the third one PhoneNumberTester. now in my PhoneNumber class i might have a run method which is called from my main method. this is where all the actions start.
Sorry may be you can get more by searching on google.
class Foo {
public static void main(String[] args) {
Bar b = new Bar(); // this line here
}
}
class Bar {
// code
}
If you compile the Foo class, when the compiler reaches the indicated line it tries and finds the Bar.class file. If it is not compiled it will compile it. The Bar class needs to be in the same package. If not you need an import statement at the top of your class so it knows where to find the class.