• Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing the sounds files in a Jar--JMF

 
Anusha Jv
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I packed all my classes and resourecs in a jar but following line gives a null Player:
Manager.createPlayer(getClass().getResource("/midi/SplashScreen.mid"));
It works when I run outside Jar.
In addition, I checked the output of gerResource, and it gives the url like:"Jar:File:.....MainClass.Jar!/midi/SplashScreen.mid". The mid file is in the jar file in the right place.
Thanks for help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!