Wednesday, July 17, 2013

How to get rid of "The libs.CopyLibs.classpath property is not set up" ... error message in NetBeans

Recently I tried to build a Java project using ant command, I received the infamous CopyLibs BUILD-FAIL message.

 $ ant

/opt/tomcat-sbillah/webapps/graph2/nbproject/build-impl.xml:786: The libs.CopyLibs.classpath property is not set up.
This property must point to
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
of NetBeans IDE installation and is usually located at
/java/ant/extra folder.
Either open the project in the IDE and make sure CopyLibs library
exists or setup the property manually. For example like this:
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar

To fix this issue I used below steps.

  1. Find "" file from "nbproject/private/" location in your project folder.
  2. Comment (#) "" attribute in file. It is pointing to a local file location (This is the root cause)
  3. Find file from your source location. Add following attributes to the file.

 4. Download "org-netbeans-modules-java-j2seproject-copylibstask.jar" file from
 5. Save this Jar file to a folder (extras). Set its path to "libs.CopyLibs.src" attribute.

6. Done !!

Reference :

No comments: