In netbeans, if you right click on a project, go to Properties then click on Libraries, it shows you a list of current JAR files added to your project. Then you can add more libraries by clicking Add JAR/Folder. However, when you click on a JAR file, it defaults to Absolute Path. In my particular case, this is never what I want and I often just hit Open and add the file incorrectly. When I check my project changes into SVN, the absolute path breaks the build for all of my team members.
So, is there a way to make Relative Path the default?
UPDATE:
To clarify, I have multiple projects open in netbeans.
Main – /lib/ contains all of my JAR files. Main refers to some of the JAR files in the lib folder, adding JAR files as described uses Relative Path by default.
PluginA – Uses and refers to some of the JAR files inside Main/lib. I’m adding the JAR files as described and they are defaulting to Absolute Path. I’d like these to use Relative Path by default.
Sadly, I suspect the existence of this bug means the answer is that there is no way to make Relative Path the default.
Looking for alternatives: in the same bug there is this description of NB behaviour:
So, if the projects live in the same SVN repository, using a single woking copy (which I did until recently and why I never noticed the Absolute / Relative problem) could work.
Otherwise maybe defining a variable for that
/libdirectory could be a workaround.