How do I embed external .wav files in my JAR?

倖福魔咒の 提交于 2021-01-27 12:44:19

问题


I want to have one JAR and nothing else, I want all external resources to be contained in it. How do I do that?


回答1:


What you are trying to do with the media will make it into what is typically called an 'embedded resource'. For that scenario, simply put the WAV files in the Jar and access them by URL. See this info. page for how to form the URL.



来源:https://stackoverflow.com/questions/12033089/how-do-i-embed-external-wav-files-in-my-jar

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