2012-05-08 93 views
0

帶有JAR的lib文件夾在哪裏?從另一個目錄加載JAR有什麼魔力嗎?哪裏是「外部」JAR的?

具體而言,其中是beansbinding-1.2.1.jar,另一個jar是swing-layout-1.0.4.jar?

圖像0​​enter image description here

目錄結構:

[email protected]:~/NetBeansProjects$ 
[email protected]:~/NetBeansProjects$ 
[email protected]:~/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 
[email protected]:~/NetBeansProjects$ 
[email protected]:~/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="."> 
[email protected]:~/NetBeansProjects$ 

回答

1

你必須添加JAR /文件夾的選項正下方添加庫。使用

+0

噢,不幸的是,我的問題一定不清楚。我的意思是,庫文件夾中已經有兩個JAR,但我無法在目錄結構中找到它們。我會更新我的問題。 – Thufir

+0

他們倆都已經在場了,對嗎?他們不會被顯示在樹中,因爲我覺得他們被放置在項目之外,並且你剛剛在外部添加了他們 – Satya

+0

好的,謝謝。你能解釋一下「外部添加」是什麼意思嗎?我能夠添加一個jar,並且會在一秒內顯示出來,但是,我想,我的問題是,如果它們是外部添加的,那麼這是什麼意思,它們在哪裏? – Thufir

0

僅供參考,我得到了以下結構:

[email protected]:~/NetBeansProjects$ 
[email protected]:~/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 
[email protected]:~/NetBeansProjects$ 

通過點擊項目屬性爲這樣:

enter image description here

,但不明白的地方這個JAR的人之前