Java: How to change icon of file programmatically?
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.
精彩评论