aspose file tools
The moose likes Beginning Java and the fly likes Calling Desktop.open() on an mp3 file fails Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Calling Desktop.open() on an mp3 file fails" Watch "Calling Desktop.open() on an mp3 file fails" New topic
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?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Calling Desktop.open() on an mp3 file fails
 
Similar Threads
Catalina.stop: java.net.ConnectException: Connection refused: connect
WAMP/Java/MysqlConnector Issue
Publishing through RAD throws javax.net.ssl.SSLHandshakeException
HTTP response code: 403 on http://translate.google.com/translate_tts?q=hello%20world
making sense of exception