Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling Desktop.open() on an mp3 file fails  RSS feed

 
Peter Dennis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using a JFileChooser to find an mp3 file:



And then trying to open with the default player (which is vlc on my computer):




However it fails with:


I have seen a couple of possible ways around it and tried what they suggested in:
http://bugs.sun.com/view_bug.do?bug_id=6599987
and:
http://www.experts-exchange.com/Programming/Languages/Java/Q_21035095.html

but can't seem to get it quite right. I continue to get different kinds of exceptions and am unable to play the file.

Could someone please tell me what I'm doing wrong?

Many thanks,

Peter.
 
Ninad Kulkarni
Ranch Hand
Posts: 802
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Peter,

Check your system privileges or check the required file condition that is normal or corrupted.
 
Peter Dennis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ninad,

It is not a permission error. I am able to play the file through Windows Explorer no problem. I think it is more that I cannot get the syntax correct on transforming the path that I am receiving in 'soundFile' to a URI.

Any chance on getting some help with that?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!