Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

No Sound after exporting JAR (JMF)  RSS feed

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I try to make a small game in which I need to play sound, I've sought a lot, The audio plays normally in Eclipse but when I export the application in a JAR file, there is no music ! Here is my code :

PS: The mp3 file is in the exported jar file, when I double click it, everything works EXCEPT for the Audio

I've been recommended to use a temporary file, then My code becomes :

and here I get an error in Eclipse, even befaure to export my project, the error is :

Error: Unable to realize
Exception in thread "main"
at tp.Main.main(

I tried a lot of sollutions, propositions, none works, I even tried JLayer, which seems to be worse ...
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!