2

I have a package that contains some classes that I want to use in many different projects.

Do I have to copy/paste that package's folder into every project folder I want to use it in, or can I somehow share the same copy of the package between multiple projects; so that, when I make a change to a package the change is being made into every project it is included in?

If this is not possible you can suggest something similar...

This didn't help.... How to import user-defined package in netbeans

How to add a JAR in NetBeans

Community
  • 1
  • 1
Scarass
  • 914
  • 1
  • 12
  • 32

1 Answers1

2

To add one project to another: properties -> Libraries -> Compile -> Add Project.

Any changes made to the project that you are referencing will save. If you have a class called test and you refactor it to test2, it should change all of your imports also.

Arthur
  • 1,246
  • 1
  • 15
  • 19
  • Netbeans 8.2, Java 1.8, Maven, project right-click → Properties, and there is no "Libraries" category – yalov Jul 19 '19 at 12:47