How do I get an Icon on a .jar file?

痞子三分冷 提交于 2020-01-15 09:45:42

问题


I have written a program in java, and I am able to execute it as a jar file. I was wondering two things. one, how would I make the .jar file have a desktop icon other than the standard java icon. and two, I am using netbeans, how would I create a .exe file instead of a .jar file?


回答1:


Like Kitsune said, you can make an executable file. The Java packager I'm most familiar with is Launch4J. It's highly configurable and can be called from Ant scripts, so it can easily integrate into an existing Ant-based build process.




回答2:


If your app. has a GUI and can be distributed from a server, look into Java Web Start.

JWS:

  • Is cross platform.
  • Can provide icons for desktop shortcuts and menu items.
  • Provides the IntegrationService that allows the user to choose what shortcuts they want.
  • Is supported by Oracle.



回答3:


You don't If you want an exe with an icon to auto-launch a jar file for you, take a look at WinRun4j.



来源:https://stackoverflow.com/questions/4882043/how-do-i-get-an-icon-on-a-jar-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!