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:
- open the project window
- right-click on “Source Package”, click “New”, and choose “Folder” under the “Other” category
- name the new folder “META-INF”
- add files (.mailcap in my case) to this folder
- build as usual
- 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的更多相关文章
- [转]Easily Add a Ribbon into a WinForms Application
本文转自:https://www.codeproject.com/articles/364272/easily-add-a-ribbon-into-a-winforms-application-cs ...
- VC++6.0 add files to project 造成Visual Studio崩溃的解决方法
1.下载filetool.exe,然后将文件解压在一个小文件夹内2.打开filetool.dsw 在release模式下编译程序,复制filetool.dll3.放在VC6.0安装目录AddIns的下 ...
- 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 ...
- "Hello World!" for the NetBeans IDE
"Hello World!" for the NetBeans IDE It's time to write your first application! These detai ...
- NetBeans部署项目(Extjs)报错(一)
NetBeans部署项目(Extjs)报错(一) 1.用NetBeans将项目部署到Tomcat中,报错. 具体如下: ant -f D:\\NetBeans\\workspace\\Foundati ...
- 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 ...
- 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 ...
- [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 ...
- 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 ...
随机推荐
- poi操作oracle数据库导出excel文件2
package com.test; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFound ...
- BZOJ 2339 卡农(组合数学)
题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2339 题意: 思路: i64 Pow(i64 a,i64 b,i64 mod){ ...
- js风格技巧
1.一个页面的所有js都可以写成这样,比如: var index ={}; index.User = ****; index.Init = function(){ $("$tes ...
- ASP.NET MVC 学习5、登陆页面改为SSO验证
单点登录(SSO,single sign-on)是一个会话或用户身份验证过程,用户只需要登录一次就可以访问所有相互信任的应用系统,二次登录时无需重新输入用户名和密码.简化账号登录过程并保护账号和密码安 ...
- mk文件剖析
一个Android.mk file用来向编译系统描述你的源代码.具体来说:该文件是GNU Makefile的一小部分,会被编译系统解析一次或多次.你可以在每一个Android.mk file中定义一个 ...
- HDU 5301 Buildings 建公寓(逻辑,水)
题意:有一个包含n*m个格子的矩阵,其中有一个格子已经被染黑,现在要拿一些矩形来填充矩阵,不能填充到黑格子,但是每一个填充进去的矩形都必须至少有一条边紧贴在矩阵的边缘(4条边)的.用于填充的矩形其中最 ...
- PL/SQL中LOOP循环控制语句
在PL/SQL中可以使用LOOP语句对数据进行循环处理,利用该语句可以循环执行指定的语句序列.常用的LOOP循环语句包含3种形式:基本的LOOP.WHILE...LOOP和FOR...LOOP. LO ...
- ByteBuffer用法小结
在NIO中,数据的读写操作始终是与缓冲区相关联的.读取时信道(SocketChannel)将数据读入缓冲区,写入时首先要将发送的数据按顺序填入缓冲区.缓冲区是定长的,基本上它只是一个列表,它的所有元素 ...
- Android开发 |常见的内存泄漏问题及解决办法
在Android开发中,内存泄漏是比较常见的问题,有过一些Android编程经历的童鞋应该都遇到过,但为什么会出现内存泄漏呢?内存泄漏又有什么影响呢? 在Android程序开发中,当一个对象已经不需要 ...
- 零基础编程指南(By Turtle)
[零.基础] 1.看文章:<程序猿搜索的技巧>(未完成) [一.入门] 学习语言:VB 安装:下载VB6即可 教程:<李天生vb从入门到精通>http://www.xin372 ...