<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    何以解憂?唯有Java

    其實程序員也懂得浪漫!
    posts - 90, comments - 637, trackbacks - 0, articles - 2
      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

    What is freeform?  

    本博客使用了在線畫詞翻譯,大家對不懂的英文單詞可以用鼠標選中,然后就會看到翻譯了!
    Freeform is a NetBeans project type that allows you to use Ant build script supplied with your sources. Typical usecase can be that you have already some sources, you are developing them "in you own way" (other IDE, or using VI, or...) and you want to work on them using NetBeans. Other common usecase for free-form can be that you check out some opensource project and you want to work on it in NetBeans IDE.
    Let's take a look at some example. For a simple project, let's assume you have structure like this:
    • my_project
      • src
      • - contains Java sources
      • build
      • - this is where you build script puts *.class files
      • lib
      • - some JAR libraries you depend on
      • javadoc
      • - here is generated output from javadoc target in build.xml
      • tests
      • - tests for your sources
      • other
      • - misc stuff
      • >build.xml
      • - you own build script
    Of course this is just en example structure, and let's say ideal ;-). So if you want to set up this project as NetBeans project, you have to do something like this:
    1. Invoke New project wizard (File | New project | Java > Java Free-form project)
    2. Name and location panel
      • Location
      • - here you specify general location of your project. In this example you would browse for my_project folder
      • Build script
      • - if it's found under the project's folder, field gets populated automatically. Otherwise browse for your build.xml
      • Project name
      • - gets auto-populated from build.xml, feel free to change it if you wish
      • Project folder
      • - this is where your NetBeans project metadata will be stored. You will later open it in IDE using this project folder. It is possible to place it to other location than location of your project folder (my_project)
    3. Build and Run Actions panel
      • Here you just bind Ant targets to IDE actions. IDE tries to guess some of them. Modify as you wish.
    4. Source Packages Folders panel
      • Add here src folder as Source packages and tests as Test packages.
      • Hit Includes/Excludes button, it brings up dialog where you can setup what do you want to have in you source root visible. If you have e.g. HTML files mixed together with Java files in package folders, you may wish to exclude those HTML files, so that IDE's projects view won't display them.
    5. Java Sources panel
      • You need to set up project dependencies here. If you on know which JAR libraries your project depends, you can add them right now. Usually they are placed in lib folder, or similar, and are distributed together with project. Ideal case. If you have no idea, leave this empty, you can set up this later using Project properties dialog.
      • In the same way you set up dependencies for sources, set up also for tests.
    6. Project output panel
      • Here comes the tricky part. You need to bind here source folders you added on Source Packages Folders panel with binaries (JAR or folder with *.class files), that are produced from those sources. However, currently you don't have probably any, because you have only sources and you did not build anything. So for now invoke Finish, you'll get back to this later.
    7. Busting error badges
      • If you haven't set up all dependencies correctly, you see probably a lot of error badges on your project file. The only way how to get rid of them is to add libraries on Java source classpath (this is acessible from project properies). The correct way how to do this is to take a look into build.xml file to examine classpath. Another approach is to look at import statements in *.java files, and try to match them with content of lib folder (and add those matching JARs to Java source classpath). After a few iterations of adding library JAR files to Java source classpath should be red error badges gone.
    8. Binding project output
      • Invoke Build. If you set up target binding correctly, build action should be invoked on Ant script and should produce binaries. In our sample case are *.class files compiled under build folder. Go to project properties, and set build folder as output for your sourceroot. This is an important thing, if you are going to use debugging or you want some other project depend on your project.
      Now your project should be set up correctly. Note that this is not any generic manual how to set up every existing project as NetBeans free-form project. But it should get some insight of possible workflow during setting thing up for newbies :)

    評論

    # re: NetBeans中freeform project的作用(熟悉Ant 的朋友比較喜歡)  回復  更多評論   

    2009-11-13 21:35 by 董云武
    fgkdfpobif
    主站蜘蛛池模板: 亚洲一区在线免费观看| 亚洲国产一区二区a毛片| 成人免费在线看片| xxxxxx日本处大片免费看| 中文字幕亚洲精品无码| 久久av无码专区亚洲av桃花岛 | 亚洲欧洲日产v特级毛片| 亚洲精品乱码久久久久久中文字幕| 国产精品免费看香蕉| 无限动漫网在线观看免费 | 无码欧精品亚洲日韩一区| 国产精品亚洲产品一区二区三区| 女人18毛片a级毛片免费| 最近高清中文字幕无吗免费看| 亚洲精品免费观看| 在线观看片免费人成视频无码 | 精品国产亚洲一区二区三区| 亚洲日本va午夜中文字幕久久| 国产免费啪嗒啪嗒视频看看| 日韩午夜免费视频| 九九免费观看全部免费视频| 国产精品亚洲专区无码牛牛| 亚洲人成网站免费播放| 亚洲综合欧美色五月俺也去| 亚洲粉嫩美白在线| 亚洲无码一区二区三区| 亚洲人成网站免费播放| 亚洲精品伦理熟女国产一区二区| 国产成人精品日本亚洲专区6| 亚洲一级毛片免费在线观看| 亚洲av无码久久忘忧草| 亚洲乱码在线观看| 亚洲AV综合永久无码精品天堂| 久久精品国产亚洲AV未满十八| 综合偷自拍亚洲乱中文字幕| 日韩在线观看免费完整版视频| 亚洲中文久久精品无码1| 久久狠狠爱亚洲综合影院| 亚洲综合无码一区二区痴汉| 亚洲AV无码资源在线观看| 亚洲性无码av在线|