Ulf Dittmer wrote:Why would you need or want to install JMF? That means opening a whole can of worms. Why not make it part of the application?
Ulf Dittmer wrote:You can detect whether JMF is available by trying to access one of its classes via Class.forName(...).
What do you mean by "JMF plugin"? JMF is a library for which plugins are available, but it is not a plugin itself. You can test for the presence of any particular JMF plugin the same way you test for JMF's presence.
Silently installing anything on a computer is nasty; don't do that. But it's probably unnecessary, too; what kind of application is this - desktop (using Swing), applet/JNLP, something else?
Rob Spoor wrote:You should start by never ever using any class in a package that starts with com.sun, sun or sunw. That includes sun.audio.AudioStream. The reason is that these classes are undocumented, and can be changed or even dropped in any next release of Java. Unfortunately, because programmers do not heed this warning, there are applications that stop working all of a sudden when a new Java version is installed. I myself found an application that only worked with Java 1.4.2_08. Even my 1.4.2_10 (at the time) Java installation refused to run the program. The cause, as indicated by the stack trace, as the use of one of these undocumented classes.
JMF is usually the way to go when wanting to play music and/or video in Java, but I found JLayer to be a little bit more intuitive to use.