“外部”JAR在哪里?

时间:2012-05-08 07:02:41

标签: netbeans ant ide build package

带有JAR的lib文件夹在哪里?从另一个目录加载JAR有什么魔力吗?

具体来说,beansbinding-1.2.1.jar在哪里,而另一个jar是swing-layout-1.0.4.jar?

图像 enter image description here

目录结构:

thufir@dur:~/NetBeansProjects$ 
thufir@dur:~/NetBeansProjects$ 
thufir@dur:~/NetBeansProjects$ tree fud/
fud/
├── build.xml
├── manifest.mf
├── nbproject
│   ├── build-impl.xml
│   ├── genfiles.properties
│   ├── private
│   │   ├── private.properties
│   │   └── private.xml
│   ├── project.properties
│   └── project.xml
└── src
    └── dur
        └── bounceme
            └── net
                └── view
                    ├── NewJFrame.form
                    └── NewJFrame.java

7 directories, 10 files
thufir@dur:~/NetBeansProjects$ 
thufir@dur:~/NetBeansProjects$ head fud/build.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="fud" default="default" basedir=".">
thufir@dur:~/NetBeansProjects$ 

2 个答案:

答案 0 :(得分:1)

您可以选择在添加库下方添加Jar /文件夹。使用

答案 1 :(得分:0)

仅供参考,我得到以下结构:

thufir@dur:~/NetBeansProjects$ 
thufir@dur:~/NetBeansProjects$ tree fud/
fud/
├── build.xml
├── lib
│   ├── beans-binding
│   │   ├── beansbinding-1.2.1-doc.zip
│   │   └── beansbinding-1.2.1.jar
│   ├── CopyLibs
│   │   └── org-netbeans-modules-java-j2seproject-copylibstask.jar
│   ├── nblibraries.properties
│   └── swing-layout
│       ├── swing-layout-1.0.4-doc.zip
│       ├── swing-layout-1.0.4.jar
│       └── swing-layout-1.0.4-src.zip
├── manifest.mf
├── nbproject
│   ├── build-impl.xml
│   ├── genfiles.properties
│   ├── private
│   │   ├── config.properties
│   │   ├── private.properties
│   │   └── private.xml
│   ├── project.properties
│   └── project.xml
└── src
    └── dur
        └── bounceme
            └── net
                └── view
                    ├── NewJFrame.form
                    └── NewJFrame.java

11 directories, 18 files
thufir@dur:~/NetBeansProjects$ 
单击项目属性

enter image description here

但不明白这个JAR在之前的位置。