How to change the icon of .bat file programmatically?

前端 未结 10 623
予麋鹿
予麋鹿 2021-02-05 00:45

I\'d like to know what\'s the way to actually set the icon of a .bat file to an arbitrary icon. How would I go about doing that programmatically, independently of t

10条回答
  •  醉话见心
    2021-02-05 01:25

    One of the way you can achieve this is:

    1. Create an executable Jar file
    2. Create a batch file to run the above jar and launch the desktop java application.
    3. Use Batch2Exe converter and covert to batch file to Exe.
    4. During above conversion, you can change the icon to that of your choice.(must of valid .ico file)
    5. Place the short cut for the above exe on desktop.

    Now your java program can be opened in a fancy way just like any other MSWindows apps.! :)

提交回复
热议问题