当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Music in .jar and BasicPlayer 3.0

问题描述:

Im working with Netbeans. Im using BasicPlayer 3.0 libs, to play a song, it plays fine when a run project with Netbeans BUT once a have my .jar file (with my lib folder and basicplayer3.0 jars) when a run my .jar project, mp3 song NEVER plays.

Any help?

Thanks!

网友答案:

In all likelihood, your application is not finding the mp3 file/resource from within the jar. If your mp3 file is held inside of the jar file, then you cannot access it as a file, but rather as a resource, and the path to the resource is different from that of a file. For a resource, the path will be relative to your class files.

For more help, show us the code where you obtain and try to use your mp3 file.

分享给朋友:
您可能感兴趣的文章:
随机阅读: