Creating/Using Class Libraries in NetBeans
I have created a Class Library project with NetBeans, I am trying to understand how to use that Class Library in a test program.
Lets say the Class Library is called MyClassLib, in package MyClassLib, and contains one class called TestClass. When I build the class library this gives me an executable JAR file named MyClassLib in the \dist folder for the MyClassLib project.
I created a new project for my test application. I copied the MyClassLib jar file to the project directory.
I'm assuming that the test program needs to have the following import:
However, this gives me the error "Package MyClassLib does not exist", which indicates I am doing something stupid here.
What is the right way to use a class library like this? What files need to be moved to the test program project and where should they go?