zoukankan      html  css  js  c++  java
  • easily add files to META-INF in NetBeans

    http://georgeinfo.blog.163.com/blog/static/16368334120101019104044650/

    ————————————————————————————————————————————————————————————

    These days when you find me working in Java, you’ll find me working in NetBeans. If I wanted to spend my time manually editing ant scripts, you’d probably find me working in vi instead.

    I needed to add a file to META-INF in my application jar a few days ago. NetBeans provides a META-INF folder in the project window for web applications, but not for standalone java applications. There is a lot of documentation for this specific problem that will help you edit your build script to get this done but for something so basic I prefer a simpler solution.

    After some experimentation I found an alternative:

    1. open the project window
    2. right-click on “Source Package”, click “New”, and choose “Folder” under the “Other” category
    3. name the new folder “META-INF”
    4. add files (.mailcap in my case) to this folder
    5. build as usual
    6. open your jar, browse to META-INF, and note that your files are now where they belong

    Please note that I’m using NetBeans 6.5, and that this method could suddenly stop working in some future version of NetBeans if the build process changes dramatically.

    If you have an alternative to this process that does not require build script modification, I would very much like to hear from you!

  • 相关阅读:
    Django框架----路由系统(详细)
    Django框架----路由系统、视图和模板(简单介绍)
    Django框架----模板继承和静态文件配置
    Django框架----模板语法
    毕昇杯之无线通信模块
    新版本ubuntu13.10软件安装
    毕昇杯总结1
    调试程序的方法总结
    新年,新气象
    基于51,人体红外感应和RC522的门禁系统
  • 原文地址:https://www.cnblogs.com/cuizhf/p/3244598.html
Copyright © 2011-2022 走看看