| Author |
Calling Desktop.open() on an mp3 file fails
|
Peter Dennis
Greenhorn
Joined: Nov 30, 2008
Posts: 12
|
|
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
Joined: Aug 31, 2007
Posts: 780
|
|
Hi, Peter,
Check your system privileges or check the required file condition that is normal or corrupted.
|
SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
|
 |
Peter Dennis
Greenhorn
Joined: Nov 30, 2008
Posts: 12
|
|
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?
|
 |
 |
|
|
subject: Calling Desktop.open() on an mp3 file fails
|
|
|