The libs.CopyLibs.classpath property is not set up

前端 未结 6 1409
误落风尘
误落风尘 2020-12-18 07:48

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

I am getting the following exception:



        
相关标签:
6条回答
  • 2020-12-18 08:12

    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

    0 讨论(0)
  • 2020-12-18 08:19

    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)

    0 讨论(0)
  • 2020-12-18 08:23
    1. In NetBeans, select Tools > Options > Miscellaneous > Ant
    2. In the Properties section, add the following property

    libs.CopyLibs.classpath=pathtoyour_netbeans/java/ant/extra/org-netbeans-modules-java-j2seproject-copylibstask.jar

    0 讨论(0)
  • 2020-12-18 08:24

    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.

    0 讨论(0)
  • 2020-12-18 08:26

    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.

    0 讨论(0)
  • 2020-12-18 08:31

    I know the OP was asking about Eclipse, but I've run into this problem a few times using NetBeans, and the standard answer to set libs.CopyLibs.classpath property in Tools, Options, Java Properties never worked for me. Neither has the answer that includes commenting out lines in nbproject/private/private.properties, etc.

    I did find that in the Project Properties dialog, under Libraries you can create a Libraries Folder and everything you specify, including the CopyLibs jar will go in there. I've done this to include all resources needed by a WAR file so the WAR wasn't dependent on server files and it worked for me.

    Hope this helps someone looking for a NetBeans answer (maybe there is something similar in Eclipse).

    0 讨论(0)
提交回复
热议问题