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!

easily add files to META-INF in NetBeans的更多相关文章

  1. [转]Easily Add a Ribbon into a WinForms Application

    本文转自:https://www.codeproject.com/articles/364272/easily-add-a-ribbon-into-a-winforms-application-cs ...

  2. VC++6.0 add files to project 造成Visual Studio崩溃的解决方法

    1.下载filetool.exe,然后将文件解压在一个小文件夹内2.打开filetool.dsw 在release模式下编译程序,复制filetool.dll3.放在VC6.0安装目录AddIns的下 ...

  3. How can I add files to a Jar file? (or add a file to a zip archive)

    https://stackoverflow.com/questions/12239764/how-can-i-add-files-to-a-jar-file M.java class M{ publi ...

  4. "Hello World!" for the NetBeans IDE

    "Hello World!" for the NetBeans IDE It's time to write your first application! These detai ...

  5. NetBeans部署项目(Extjs)报错(一)

    NetBeans部署项目(Extjs)报错(一) 1.用NetBeans将项目部署到Tomcat中,报错. 具体如下: ant -f D:\\NetBeans\\workspace\\Foundati ...

  6. FreeHttp (a fiddler add in to temper the http)

    introduction FreeHttp is a Fiddler plugin. With FreeHttp you can modify the request or response mess ...

  7. Adding Cache-Control headers to Static Files in ASP.NET Core

    Thanks to the ASP.NET Core middleware pipeline, it is relatively simple to add additional HTTP heade ...

  8. [Nuxt] Add CSS Libraries to Nuxt

    You can easily add CSS libraries to Nuxt using yarn or npm to install them, then simply adding them ...

  9. Transferring Files to Your Instance with WinSCP

    WinSCP is a GUI-based file manager for Windows that allows you to upload and transfer files to a rem ...

随机推荐

  1. Classpath entry org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER will not be exported

    打开navigator,修改下面的classpath文件: 将<classpathentry kind="con" path="org.maven.ide.ecli ...

  2. shell/bash 让vi/vim显示空格,及tab字符

    shell/bash 让vi/vim显示空格,及tab字符 Vim 可以用高亮显示空格和TAB.文件中有 TAB 键的时候,你是看不见的.要把它显示出来::set listTAB 键显示为 ^I,   ...

  3. CSS在不同浏览器兼容问题,margin偏移/offset溢出等

    margin在垂直取值时取最大值 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "h ...

  4. 真心崩溃了,oracle安装完成后居然没有tnsnames.ora和listener.ora文件

    problem: oracle  11  r2  64位安装完成后NETWORK/ADMIN目录下居然没有tnsnames.ora和listener.ora文件 solution: 问题是之前安装了另 ...

  5. 发布mvc3的项目时system.web.mvc 版本 为3.0.0.1高于服务器版本3.0.0.0 升级到3.0.0.1

    下载地址在这里: http://www.microsoft.com/zh-cn/download/details.aspx?id=44533&WT.mc_id=rss_alldownloads ...

  6. HNOI2010弹飞绵羊

    不得不说块状数组好神奇的啊!这道题的标签可是splay的启发是合并(什么高大上的东西),竟然这么轻松的就解决了! var x,y,i,j,tot,n,m,ch:longint; f,k,l,bl,go ...

  7. js自动判断浏览器类型跳转到手机版

    //电脑版头部写法:<script language="javascript"> function is_mobile() { var regex_match = /( ...

  8. Linq 时间对比陷阱坑

    同样的两个datetime 格式的时间     2013年12月2日 17点29分57秒  

  9. linux - 开机启动thunderbird、chromium

    cd ~/.config/autostart/(没有autostart,自己 mkdir autostart) vim thunderbird.desktop,输入以下: [Desktop Entry ...

  10. FFMPEG视音频编解码零基础学习方法

    在CSDN上的这一段日子,接触到了很多同行业的人,尤其是使用FFMPEG进行视音频编解码的人,有的已经是有多年经验的“大神”,有的是刚开始学习的初学者.在和大家探讨的过程中,我忽然发现了一个问题:在“ ...