Audio does not play in Jar but does in eclipse

前端 未结 4 2038
眼角桃花
眼角桃花 2021-01-27 08:36

Sound does not play when I run the JAR, but it does when I run it in eclipse.

Here is where I load the clips:

public void init(){
    System.out.println         


        
4条回答
  •  情书的邮戳
    2021-01-27 09:36

    How about-

    1. Right click on your project in Eclipse. Then New -> Source Folder.
    2. Name the source folder anything. e.g. music_src.
    3. Copy or drag the entire music directory in music_src. Then make the jar.

提交回复
热议问题