How do I embed external .wav files in my JAR?
问题 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