Issue
I have a freeform Java project (with my own build.xml file) in NetBeans 7.3 and I need to add a 3d party library jar to this project. I know how to do that to build and run, but when editing I still see warnings about "cannot find symbol...". When I open the project properties and click on "Java Sources Classpath" I see the "Add JAR/Folder" button as inactive (why? I don't know, I couldn't find a way to change that). I know that I can edit the project "nbproject/project.xml" file manually, but I need an exact syntax.
Could you please give me a piece of advice, how to add a library jar into the "nbproject/project.xml" file for a freeform NetBeans project?
Solution
OK, I can answer my own question now - thanks to the NetBeans plugin, called "Freeform Project Extras", which provides a number of new templates and some documentation about the "project.xml" layout. So, the "project.xml" should contain the following XML element (in its simplest form):
<java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/2">
<compilation-unit>
<package-root>${basedir}</package-root>
<classpath mode="compile">abc.jar:xyz.jar</classpath>
</compilation-unit>
</java-data>
It's essential to refer to the second version of the XML schema here.
Answered By - HEKTO
Answer Checked By - Clifford M. (JavaFixing Volunteer)