JMFCustomizer

The JMF is a large, optional API that extends the functionality of the Java platform. For users to run JMF-based programs, they must download and install the JMF API on their own machines. That can be problematic for some users who don't feel confident to complete such tasks. This can limit both the distribution and appeal of JMF-based programs—many users are happy to run a prepackaged application (or applet), but will balk at the prospect of having to download and install some software first.

The JMFCustomizer application has been provided by Sun to help JMF developers address this issue. JMFCustomizer is a simple application that allows the user to select a subset of the classes that compose the JMF. Those classes are then encapsulated as a JAR file, which can be distributed with the application (or applet).

The intention of this approach is that the user doesn't need to have the JMF installed on his machine. The developer of the application selects the subset of the JMF that is required by the application and distributes that (as a JAR file) along with the application itself. The user then has all that he requires in a single distribution. Figure 9.10 shows such a usage of JMFCustomizer.

Figure 9.10. Use of JMFCustomizer to create a JAR file containing the subset of the JMF necessary for a particular application.


Running JMFCustomizer is as simple as java JMFCustomizer. After that GUI components such as check boxes and buttons lead the user through the selection of appropriate classes and the creation of the JAR file.

However, although the JMFCustomizer application is part of the standard JMF 2.1.1 distribution, it isn't (by default) in the classpath. As such the developer wanting to employ JMFCustomizer must modify the classpath to include the customizer.jar file (that is found in the same folder and directory as jmf.jar). The particulars of setting the classpath variable depend on the operating system in question. Sun's “Setting Up and Running JMF on a Java Client” at http://java.sun.com/products/java-media/jmf/2.1.1/setup-java.html describes the simple steps for all operating systems.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset