This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing the sounds files in a Jar--JMF  RSS feed

 
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!