在jar文件中创建ini文件? [英] Create ini file in jar file ?

查看:98
本文介绍了在jar文件中创建ini文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有java文件,.log文件和.ini文件.

我想将这3个文件创建为.jar文件.

我已经创建了.jar文件,但是该jar中没有.ini文件?

为什么未在.jar文件内创建.ini文件?

I have java file , .log file and .ini file.

i want to create these 3 files into .jar file.

i have created the .jar file ,but there is no .ini file inside that jar ?

why .ini file is not created inside the .jar file?

推荐答案

为什么您应该为您创建.INI文件? .INI是Windows初始化参数的过时存储,与Java几乎没有关系.

如果出于某种奇怪的原因,您创建了一个.INI文件并将其存储在JAR文件中,则可以记住,JAR文件基本上是一个ZIP文件.所有zip文件存档程序都可以从JAR文件中提取文件并将其打包.如果要这样,请参见软件包java.util.zip:
http://docs.oracle.com/javase/1.4.2/docs/api/java/util/zip/package-summary.html [
Why do you think a .INI file should be created for you? .INI is the obsolete Windows storage for initialization parameters, have little or nothing to do with Java.

If, by some weird reason, you created a .INI file and want to store it in a JAR file, you can remember that a JAR file is basically a ZIP file. All zip file archive programs can extract files from a JAR file and pack them. If you want to go this way, see the package java.util.zip:
http://docs.oracle.com/javase/1.4.2/docs/api/java/util/zip/package-summary.html[^].

—SA


这篇关于在jar文件中创建ini文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆