I am using NetBeans 6.8.
I have a class ClassA
situated in PackageA
in JavaApplicationProject1
.
I plan to use this class in ClassB
situated in PackageB
in JavaApplicationProject2
just by importing it. One option is to copy ClassA
in PackageB
, but I don't want to copy. How can I do this?
Under Project Properties -> Libraries -> Compile -> Add Project
you can add project dependencies. So adding JavaApplicationProject1
as a project dependency in JavaApplicationProject2
will do what you want. Details can be found in this guide