Get Swinging with the QuickTime for Java SDK
From MPEG-4 for video to MP3 for audio, Apple's QuickTime supports a vast number of media formats. With the QuickTime for Java Software Development Kit (SDK), Java developers can now develop their own custom applications to tap into QuickTime's widespread support of media formats. In this article, we'll introduce you to the QuickTime for Java application programming interface (API). You'll learn how to create a simple player using Java Swing.
This article assumes that you have a working knowledge of Java Swing. For more information on using Swing, see the References section at the end of the article.
Installing QuickTime for Java
Prior to installing QuickTime for Java, you need to have at least Java Runtime Environment 1.4 installed. QuickTime for Java only works on the Microsoft Windows and Macintosh platforms. Our study was performed with QuickTime Player version 6.5.1, which you can download for free. To install the libraries for QuickTime for Java, you need to perform a custom install (see Figure 1).
When presented with the list of possible custom objects to install, choose the QuickTime for Java option (see Figure 2).
Figure 1 Custom install of Apple QuickTime allows you to install the QuickTime for Java option.
Figure 2 Choosing the QuickTime for Java component during custom installation.
After installing the QuickTime for Java component, the installation process adds a new reference to your system CLASSPATH, pointing to a file named QTJava.zip that was added to your Java runtime's lib\ext directory (see Figure 3). When making your own Java applications that use the QuickTime Java API, you'll need to include this file in your build and runtime class paths.
Figure 3 The installation process adds a pointer in your CLASSPATH to QTJava.zip.