java中的属性(properties)文件怎么新建

java中的属性(properties)文件怎么新建,第1张

java.util.Properties

类中有方法

Object

setProperty(String key,

String value)

Calls the Hashtable method put.

void

store(OutputStream out,

String comments)

Writes this property list (key and element pairs) in this

Properties table to the output stream in a format suitable

for loading into a Properties table using the

load(InputStream) method.

void

store(Writer writer,

String comments)

Writes this property list (key and element pairs) in this

Properties table to the output character stream in a

format suitable for using the load(Reader)

method.

void

storeToXML(OutputStream os,

String comment)

Emits an XML document representing all of the properties contained

in this table.

void

storeToXML(OutputStream os,

String comment,

String encoding)

Emits an XML document representing all of the properties contained

in this table, using the specified encoding.

解决方法如下:

1、首先 win+r

2、打开运行程序

3、输入: regedit

4、找到: 计算机/HKEY_CURRENT_USER/SOFTWARE/MICROSOFT/WINDOWS/currentversion/Explorer/FileExts/.lnk会发现有openwithlist 和 openwithprogids 两项,如果有其他的选项将其删除

5、再将openwithlist 内的除默认以外的所有键值都删除

6、将openwithprogids内的除默认和lnkfile以外的所有键值都删除.

7、保存退出即可

如果还有图标不能还原的可以在控制面板〉外观和个性化〉个性化〉 点击更改桌面图标按钮,在d出的面板内点击 还原默

认即可!

重启就可以了~


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/11412235.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-15
下一篇 2023-05-15

发表评论

登录后才能评论

评论列表(0条)

保存