Skip to main content

FX Media Status

3 replies [Last post]
Joined: 2008-08-01

Hi All,

I was wondering if someone could shed some light on the current status of playing media files using JavaFX. When I attempted to play a wmv file I received a MediaUnavailableException exception.

I believe i've read that full support will not be available until version 1.0, and that in order for the media to work on Windows currently that native drivers must be present.

Is this correct? If so, which native drivers exactly?


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2008-06-19

it do works. I have tried it and it works wonderfully.

Remember to copy all jmc *.dll from JavaFX to Windows directory. It need dll to work otherwise error such as MediaUnavailableException will show.

Joined: 2008-08-01

Thanks. The next question is where do I find the jmc *.dll files? I cannot seem to find them anywhere.

Joined: 2005-06-16

I'm also getting: Unsupported media: file:/c:/Users/Devel/Videos/movie.avi
source ='file:/c:/Users/Devel/Videos/movie.avi'

That's while I'm trying to run the media tutorial demo that comes with JavaFX SDK 1.0 Preview 1.

I downloaded movie.avi from the link provided in tutorial instructions.

I had to modify the SimplePlayer.fx source a bit. I was getting:

FX Media Object caught Exception java.lang.IllegalArgumentException: URI is not absolute
source ='movie.avi'

so I changed the line:

media: Media {source: "movie.avi"}


media: Media {source: "file:/c:/Users/Devel/Videos/movie.avi"}

While writing this I got some more ideas and fixed the issue ...

I'm using Netbeans which for some unknown reason bypasses system PATH setting where I added the path to javafx lib dir that contains the DLLs.

To get Netbeans Run to use the DLLs, open project properties, and under Run configuration add this to VM Options:


(where path-to-javafx is a placeholder for the actual path)

Hopefully this will prevent someone from giving up on JMC as I almost did :)

(BTW: movie playback works like a charm - I can play any codecs that are installed on the system - just as if I was using media player classic, or VLC ... beautiful :)