开发者

Java: How to change icon of file programmatically?

开发者 https://www.devze.com 2023-03-28 02:43 出处:网络
H开发者_运维知识库ow to change icon of a file programmatically using Java? It shouldn\'t be for a jar application.Well there is one way that I can think of and I know it has been done:

H开发者_运维知识库ow to change icon of a file programmatically using Java? It shouldn't be for a jar application.


Well there is one way that I can think of and I know it has been done:

  • Step 1: you change that file's extension
  • Step 2: you change the operating system associated program to that new extension to the one of the previous extension
  • Step 3: you change the system icon for that particular extension

One flaw though is that for some types of file (especially on osx) you will have this preview mechanism going... I think this would be a lot easier to accomplish on windows.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号