There are several ways to fix this.
a. When you define your library, use the path to the common place. A location that is identical on each machine — for example, the location of the JAR installed with a third-party application in Program Files or / usr / local / works well or a network drive.
Then, when they check the code, the path will still be correct, and they don’t need to define the library in the Netbeans workspace.
C. Modify the project.properties file to use the relative path. Open the project.properties file and find " libs.LIBRARY_NAME.classpath=... ". This will be the "default location" if the library is not defined.
Modify this to use the path relative to your project and store the jar files in your project. For example: libs.Log4J.classpath=lib/log4j.jar
Keep in mind that the library definition in your library manager will override this value - make sure you keep them in sync (for example, add the version number to the library name!).
C. Use the Vincent suggestion to use a build system such as Maven. The Maven build process will handle dependency loading, etc. Netbeans has plugins for several popular build systems.
source share