Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The libs.CopyLibs.classpath property is not set up

Tags:

java

eclipse

ant

I'm using Eclipse Indigo (3.7) to build an application using ant and a build.xml file.

I am getting the following exception:

C:\navigator\nbproject\build-impl.xml:774: 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 
<netbeans_installation>/java<version>/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

Can anyone suggest me how to resolve this issue?

like image 347
user3588496 Avatar asked May 08 '14 04:05

user3588496


4 Answers

I had the same problem after pulling a NetBeans project from GitHub. The problem was, the file /nbproject/private.properties contained a line...

"user.properties.file=C:\\Users\\Thilina\\AppData\\Roaming\\NetBeans\\7.3\\build.properties" 

...which was pointing to a wrong location. I corrected that and the problem went away.

like image 58
Thilina Premasiri Avatar answered Nov 17 '22 09:11

Thilina Premasiri


Please find below for the Solution: Below is an error that I was facing while building the project:

"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"

Here is a solution:

--> Open Netbeans

--> Select Project

--> Right Click

--> Property

--> Libraries

Now change the path of the library where your javaee-endorsed-api-7.0 is stored. In file browser

--> Select your project

--> Select lib folder

--> Click Open Button

You will ables to see it will be like: lib\nblibraries.properties

Now your problem is resolved. Do not need to download the file beacuse it comes with Netbeans Package. You just have to find the file.

Please check image how it looks (Project-->Libraries & Path)

like image 41
ashish patel Avatar answered Nov 17 '22 09:11

ashish patel


This following worked for me:

1) Downloaded and added the org-netbeans-modules-java-j2seproject-copylibstask.jar to my Ant/lib directory: C:/apache-ant-1.9.4/lib/

2) (in command line) Navigated to the folder containing my "build.xml" file:

cd C:\eclipse_workspace\myproject\abcfolder

(my build.xml location: C:\eclipse_workspace\myproject\abcfolder\build.xml)

3) Ran the following commmand:

ant -Dlibs.CopyLibs.classpath=C:/apache-ant-1.9.4/lib/org-netbeans-modules-java-j2seproject-copylibstask.jar

I got a successful build.

like image 4
BustedSanta Avatar answered Nov 17 '22 08:11

BustedSanta


I just stumbed across this article which helped me:

How to fix the libs

Instructions for Netbeans 8

Open:

Tools -> Options -> Java -> Ant

Paste the following in Properties:

libs.CopyLibs.classpath=[Netbeans Install]NetBeans6.5java2antextraorg-netbeans-modules-java-j2seproject-copylibstask.jar

like image 3
TomDK Avatar answered Nov 17 '22 08:11

TomDK