Register your product to gain access to bonus material or receive a coupon.
Essential JMF brings together all the information experienced developers need to build platform-independent multimedia players with the new Java Media Framework API. Like all books in Prentice Hall PTR's Essential Series, it delivers no-nonsense, nuts-and-bolts coverage in a task-oriented reference format that helps professional developers find answers fast.KEY TOPICS:Authors Rob Gordon and Stephen Talley start by introducing JMF, including class structure, player design and basic multimedia concepts. Next, they show how to customize JMF, presenting an Abstract Player Framework that cuts 90% of the work involved in creating players for custom media formats. They walk through building a robust mixer applet, present a simple guide to media-enabling existing Java software, and show how to use the Java Media Framework with JavaScript.MARKET:Experienced Java developers who want to work with the Java Media Framework.
Click here for a sample chapter for this book: 0130801046.pdf
I. USING THE JAVA MEDIA.
Framework Chapter 1Introduction.
2. Why JMF?Introduction. The Java Media Framework. The Java Media Player. The Java Media APIs. Related Products. Well, Why? Summary.
3. The Basics of JMF Programming.Introduction. An AudioClip Example. Playing Audio Using JMF. 1-Shot Play of Audio Using JMF. Looping Play of Audio Using JMF. The Control Panel Component. The Visual Component. Introducing the EJMF Toolkit. EJMF Toolkit PlayerDriver. EJMF Toolkit PlayerPanel. The GenericPlayer. Summary.
4. JMF Architecture.Introduction. Overview of a JMF Player. The User's View: A Synopsis. The Player Interface. Rendering Data. Access to AWT Components. Managing Multiple Controllers. The MediaHandler Interface. The DataSource Interface. The Controller Interface. Controller States. State Transitions. The Duration Interface. The Clock Interface. Media Time. Time-Base Time. Mapping Time-Base Time to Media Time. Building a Player. Manager: The Player Factory. Identifying Media. The Player as Implemented. Summary.
5. The Clock.Introduction. What's Time? Time Base Time. Media Time. Mapping Time-Base Time to Media Time. Mapping Media Time to Time-Base Time. Starting a Clock. Immediate Time-Base Synchronization with syncStart. Deferred Time-Base Synchronization with syncStart. Tracking Time to Time-Base Synchronization. Accessing Media Time. Clock Rate. Setting Clock Rate. Getting Clock Rate. Stopping a Clock. Stopping Immediately. Stopping at a Specified Time. Restrictions on Clock Methods. Summary.
6. The Controller.Introduction. Controller States. Unrealized. Realizing. Realized. Prefetching. Prefetched. Started. State Transitions. State Transition Methods. Controller State Transition Methods. Clock State Transition Methods. Controller Events. Transition Events. Change Events. Close Events. Control Events. Controller Events Class Hierarchy. Stopping a Player. Controller State Machine In Action. The StateChanger Example. Identifying Controller State. Getting Controller Status. Controller Duration. Restriction s on Method Invocation. Events, Errors, and Exceptions. Media Errors. Media Exceptions. More from the EJMF Toolkit. The StateWaiter Class. BlockingPlayer Example. Asynchronous Stop and Deallocate. Summary.
7. The Player.Introduction. Visual and Control Panel Components. GainControl. The Start Method. When You Gotta Play ASAP. Relaxed Method Restrictions. Restrictions on Method Invocation. DataSource Support. The DataSource. Connecting to the Media. Synchronized Managed Controllers. Summary.
8. Player Controls.Introduction. Controls: An Overview. The Control Component. Whence Controls? Controller Controls. Gain Control. Manipulating Gain Value. Listening for Changes to Gain Value. Muting an Audio Signal. Caching Control. User Control. Programmatic Control. Caching Events. Monitoring Media Download: An Example. CachingControlEvents: Reality Check. Summary.
9. Synchronizing Multiple Players.Introduction. Explicit Synchronization: The Building Blocks. Sharing a TimeBase. Accommodating Start Latency. Tracking State Changes. Rate, Media Time, Stop Time and Explicit Synchronization. Explicit Synchronization: An Example. XSync: A Class for Explicit Synchronization. XSListener: A ControllerListener for Explicit Synchronization. Starting Multiple Players with syncStart. An Augmented SyncStartStrategy? Running XSync. Synchronization Using addController. Adding a Controller. Managing Slave Co ntrollers. Removing a Controller. addController Synchronization: An Example. Which Control Panel? Running ACSync. A Discussion of Trade-Offs. Summary.
10. Locating the Player.Introduction. Stepping Stones to a Player. createPlayer: The Complete Algorithm. Creating a Player from a URL. Creating a Player from a MediaLocator. Creating a Player from a DataSource. The MediaProxy Interface. The PackageManager Class. Locating a DataSource. Locating a MediaHandler. Retrieving the Package Prefix Lists. Manipulating the Package Prefix Lists. Registering JMF Extensions: An Example. More from the EJMF Toolkit. Summary.
II. EXTENDING THE JAVA MEDIA FRAMEWORK.
11. Introduction.Introduction. Player Methods. Why Interfaces? A Solution. Framework Structure. Requirements for JMF API Compliance. A Framework Model. Implementing the Model. Model Assumptions. Summary.
13. Implementing the Clock Interface.Introduction. Selecting a TimeBase. Clock Rate. Media Time. Setting The Media Time. Getting The Media Time. Mapping Media Time to TimeBase Time. Starting and Stopping the Clock. Time-Base Synchronization Time. Interpretation of getSyncTime API. Stop Time. Summary.
14. Implementing the Controller Interface.Introduction. State Manipulation. Event Handling. Dispatching ControllerEvents. Using the ControllerEventQueue. Clock Methods. Selecting a TimeBase. Controller Rate. Media Time. Stop Time. Enforcing the Stop Time. Duration Methods. Control Methods. Obtaining a Controller's Controls. Adding and Removing Controls. Integrating a Custom Control. An Example: Integrating the Rate Control. Summary.
15. Implementing the Controller Transitions.Introduction. Forward vs Backward Transitions. To Thread or Not to Thread. Asynchronous Forward Transitions. Synchronous Backward Transitions. Changing the Default Thread Behavior. Playing It (Thread-)Safe. Synchronizing the Forward Transitions. Using the ThreadQueue Class. Synchronizing the Backward Transitions. action/doAction Revisited. Realizing the AbstractController. The synchronousRealize Method. Prefetching the AbstractController. The synchronousPrefetch Method. SyncStarting the AbstractCo ntroller. The synchronousSyncStart Method. Blocking the Current Thread Until the Playback Start Time. Stopping the AbstractController. More Than One Way to Stop. The Last Stop: End of Media. Deallocating the AbstractController. Closing the AbstractController. Summary.
16. Implementing the Player Interface.Introduction. Why a Player? Player Functionality. Augmenting the action/doAction Model. Player Components and Controls. The Visual Component. The Control Panel Component. The GainControl. Acquiring the Media: DataSource Support. Relaxed Restrictions on Clock Methods. A More Flexible setMediaTime. A More Flexible setRate. Further Relaxation: The start Method. The synchronousStart Method. Adding a Managed Controller. Removing a Managed Controller. Implications of Managed Controller Support. Player D uration. Calculating the Aggregate Duration. Getting the Aggregate Duration. Player Start Latency. Calculating the Aggregate Start Latency. Putting the Algorithm into Practice. Setting the Media Time. Setting the Rate. Getting the Managed Controllers. Summary.
17. Implementing the Player Transitions.Introduction. Player Transition Model. Managing Controller Transition Failure. The ManagedControllerErrorEvent Class. Realizing the Player. Prefetching the Player. Starting the Player. Stopping the Player. End of Media. Deallocating the Player. Closing the Player. Summary.
18. Creating a Custom Player.Introduction. Four Steps to a Custom Player. The Text Player. The TickerTape Component. Implementing the Player Interface. Player Initialization. Realizing the Text Player. Prefetching the Text Player. Starting the Text Player. Stopping the Text Player. Deallocating the Text Player. Closing the Text Player. Implementing the Clock and Duration Operations. Integrating the Text Player. Running the Text Player. Moving On. The Multi-Image Video Player. The MIV Format. Creating Your Own MIV File. The Mu ltiImageRenderer Component. Implementing the Player Interface. Player Initialization. Realizing the MIV Player. Prefetching the MIV Player. Starting the MIV Player. Stopping the MIV Player. Deallocating the MIV Player. Closing the MIV Player. Implementing the Clock and Duration Operations. Integrating the MIV Player. Registering a New Content-type. Creating the Package. Running the MIV Player. Summary.
19. Creating Custom Controls.Introduction. Some Design Issues. Rate Control. TimeDisplay Control. Implementing ControllerListener. Implementing SourcedTimerListener. Implementing TimeSource. Caching Control. BasicCachingControl Constructor. Implementation of the CachingControl Interface. BasicCachingControl: The Meat. Summary.
20. Creating Control Panel Controls.Introduction. A Custom Control Model. The AbstractListenerControl. AbstractListenerControl Class Diagram. AbstractListenerControl Constructors. The Control Interface. Providing the Default Component and Listener. Managing Component-Listener Association. Determining Whether a Control Is Operational. Setting the Component and Control Listener. The ListenerControl Classes. Managing the Control Listener. Type-Safe Setters. Control Panel Controls. The Standard Controls. Start, Stop and Pause Controls. Fast Forward and Reverse Controls. Progress Slider Control. Gain-Related Controls. Summary.
21. Creating a Custom Control Panel.Introduction. The EJMF Toolkit Control Panel Package. The AbstractControlPanel. AbstractControlPanel Constructor. Layout Management Support. Accessing Controls. The AbstractControls Class. AbstractControls Constructor. Accessing Controls. AbstractControls as a ControllerListener. Building a Concrete Control Panel Class. The StandardControlPanel. Extending AbstractControlPanel. The StandardControls. Implementing makeControls. Implementing setControlComponentState. Overriding controllerUpdate. Using the StandardControlPanel. Customizing StandardControlPanel. StandardControlPanel Setters. StandardControlPanel Setters In Action. The EjmfControlPanel. Extending StandardControlPanel. Extending StandardControls. The Essential JMF Control Components. The Essential JMF Controls. Summary.
22. Creating a Custom DataSource.Introduction. The NNTP Protocol. Constructing a MediaLocator. The NNTP MediaLocator. Retrieving An Article. Five Steps to a Custom DataSource. DataSource Structure. Implementing the DataSource Class. Initializing the DataSource. Connecting the DataSource. Starting the DataSource. Stopping the DataSource. Disconnecting the DataSource. Tying the DataSource to the SourceStream. Additional DataSource Methods. Implementing the SourceStream Interface. Constructing the NNTPSourceStream. The SourceStream Methods. The PullSourceStream Methods. Integrating the NNTP DataSource. Using the DataSource. Summary.
III. BUILDING JMF APPLETS AND APPLICATIONS.
23. Introduction.Introduction. A Simple Mixer. Running SimpleMixer. The SimpleMixer Interface. The Design of SimpleMixer. The MultiPlayer: An Overview. MultiPlayer Class Diagram. The Details of the MultiPlayer. Creating a MultiPlayer. MultiPlayer Control Operations. MultiPlayer States. MultiPlayer State Change Notification. MultiPlayer as ControllerListener. MultiPlayer ViewingPanel. The MultiPlayerControl. The TimerMultiPlayerControl. TimerMultiPlayerControl Class Diagram. The MixerEvent List. Creating the Event List. Normalizing the Event List. Timer Ticks and MixerEvents. Executing a MixerCommand. The MixerCommand Interface. Starting the TimerMultiPlayerControl. Stopping the TimerMultiPlayerControl. Summary.
25. A MultiPlayer Applet.Introduction. The MIX File. HTML Output from SimpleMixer. A MultiPlayer Applet. The init Method. The start Method. The destroy Method. Summary.
IV. APPENDICES.
Appendix A: Supported Media Types.Introduction. Current JMF Implementations. Browser Compatibility. Downloading Netscape Communicator. The Java Plug-In. What is Java Plug-In? How Does Java Plug-In Work? HTML Conversion. Compatibility Matrix Using Java Plug-In. Downloading The Java Plug-In. The JMF Run-Time. appletviewer and HotJava.
Appendix C: Configuring the Java Media Framework.Configuring JMF. Configurable Properties. jmfconfig Actions.
Appendix D: Resources.Multimedia Resources. Discussion Lists. Glossary.
Appendix E: Unified Modeling Language Notation.A UML Example.
Appendix F: Java Media Framework API.Preface
What This Book Is About
This book describes the Java Media Framework (JMF) API and how to use itto integrate audio and video playback into Java applications and applets.The JMF API consists of three pieces: playback, capture and video conferencing.This book covers only the first piece, specifically, the Java MediaPlayer API.
This book does not stop at the API, however. It also discusses the differentimplementations of that API, how they differ, and even their failure to conformto the API. Where the API is open to interpretation, a discussion of variousinterpretations is undertaken.
This discussion appears in the context of developing a framework for build-ingyour own custom Player implementation. The framework code appearingin this book provides all the API-compliance code necessary for building anAPI-compliant Java Media Player, leaving you to focus on the media-specificcoding issues.
Finally, this book has sprinkled throughout examples from the EssentialJMF Toolkit, a collection of reusable Java classes for many multimedia occasions.1
Who Should Read This Book?
This book is written for the Java engineer or aspiring Java engineer who needsto integrate audio and video into his applications or applets. It assumes somefamiliarity with the Java language but you need not be an expert. Webmasterswith JavaScript and perl experience could easily adopt some of the examplesin this book for rudimentary multimedia applications. In other words, if youare interested in Java and multimedia, this book becomes you.
Who Should Buy This Book?
Everyone.
Structure of This Book
This book contains four distinct parts. We have even named the parts andinserted a decorative page between them so there is no doubt as to which iswhich.
Part I, "Using the Java Media Framework," comprises the first ten chapters.Part I was written for the reader who wants to learn to use the JMF Player.After finishing Part I, you will know all there is to know about using a Playerfor playback of currently supported media types.
If that is not enough to satisfy you, Part II, "Extending the Java MediaFramework," will show you how to build a complete Player to support a newmedia type. Not only will Part II show you how to do this, but when you arefinished, you will have a good deal of code available to use with still newerand more exciting media types.
In addition, Part II covers the building of a custom GUI for a Player, againproviding lots of reusable code. And, if that were not enough, Part II coversthe creation of a new DataSource for support of an actual protocol, the NNTPprotocol for downloading articles from news groups. Put together the customPlayer and DataSource developed in Part II and you have a Java Media Playerfor reading articles from your favorite news group. Strange, but elegant!
In Part III, "Building JMF Applets and Applications," a simple media mixerapplication is presented. Using this application you can generate HTML forinclusion in your web pages that need to playback multiple media sources.The MultiPlayer class, also presented in Part III, can then be dropped rightinto your applet to play the media described by the HTML.
The books finishes up with a collection of appendices in Part IV. Hereinyou will find complete reference material for the JMF API and the EssentialJMF Toolkit. There is also a discussion of the use of the JMF with variousbrowsers, some potentially useful URL resources and a virtual glossary, toboot.
Using This Book
The first three parts of this book can, more or less, stand alone. If you do nothave an immediate need to create your own Player, reading Part I and referencingthe appendices as needed will meet your needs.
If you need to create your own custom Player to support a new media format,Part II is for you. If you are in a real hurry, you may be able to get by withjust reading Chapter 18, "Creating a Custom Player." You can at least startthere and refer back to earlier chapters in Part II as necessary. In any case,understanding Part II really depends upon having the knowledge and wisdomcontained in Part I. If you did not get such knowledge from somewhere else,you may as well get it from there.If you need an easy way to play multiple media files from an applet, godirectly to Part III.
Part IV is the work horse section of the book: It is there when you need it,ready and willing.
We recommend you do not read this book backwards. We cannot guaranteethat there are no hidden, satanic messages.
Gathering the Pieces
To derive the fullest benefit and pleasure from reading this book, you willneed to have the following pieces of software installed on your computingdevice.
A section is dedicated to the acquisition and installation of each of thesepieces. In addition to this software, there is the presumption that some fundamentalsoftware already exists on your computer, specifically, the necessaryaudio and video device drivers. For Solaris and Windows machines that havenot been butchered by an overzealous system administrator, this a safeassumption.
Downloading JDK
To use Sun's implementation of the JMF, you will first need to have installedsome flavor of JDK 1.1.x. The latest version is available at http://java.sun.com/products/jdk/1.1/.
Intel's implementation does not require JDK 1.1. If you still have a versionof JDK 1.02 sitting around and will only be using Intel's JMF, you are set.However, to use the examples included with this book, you will need JDK 1.1.
As part of installing your JDK, you will want to set the JDK_HOME
environmentvariable to reference the directory in which the JDK was installed. Thisenvironment variable is referred to in later discussions.
Downloading Swing
Since all the GUI code written for this book uses Swing components, you willneed to have the Swing jar files installed on your system.
The Swing component set is available from The Swing Connection. Todownload the Swing classes, go to http://java.sun.com/products/jfc/index.html#download-swing. The downloaded file is a ZIP filecontaining jar files for different platforms. After unzipping the downloadedfile, say in /jfc (d:\jfc
for Windows), you will want to change yourCLASSPATH as shown below, depending on which platform you are running.Swing on Solaris
On Solaris, you will want to include swing.jar
in your CLASSPATH. Forexample, using ksh, type:
% export CLASSPATH="/jfc/swing.jar:$CLASSPATH"
Swing on Windows
If you are running on a Windows machine and want the Windows Look &Feel, you will also need to add windows.jar
to your path.
% set CLASSPATH=\
c:\jfc\swing.jar;c:\jfc\windows.jar;%CLASSPATH%
Including only swing.jar
file in your CLASSPATH will give you the Java(or Metal) Look & Feel.
If you are new to Swing, there is more information on the above topics inthe README file that comes with the Swing distribution and resides in theinstall directory.
Downloading JMF
You can obtain a copy of a JMF implementation from either Sun or Intel. Ifyou will be using JMF on Solaris, you are limited to Sun's implementation. Ifyou will be running on Windows 9x or Windows NT, you can choose betweenSun and Intel.
Downloading Sun Implementation
Sun's implementation of the JMF can be downloaded from http://java.sun.com/products/java-media/jmf/1.0/.
Installing Sun Implementation On Solaris
Solaris installation is accomplished with a shell script. For example, if youhave downloaded the JMF distribution file into /home/me/tmp
and you wantto install JMF in /home/me/jmf
, you would perform the following steps:
% cd /home/me
% sh /home/me/tmp/jmf101-solaris2-sparc.bin
% export JMFHOME=/home/me/jmf
The JMF will now be installed in /home/me/jmf
and the JMFHOME environmentvariable will have the value /home/me/jmf
.
The following table describes the recommended configuration for usingSun's JMF on a Solaris platform.
Up-to-date installation instructions and system requirements can be foundin $JMFHOME/html/setup.html
after you have downloaded and installedthe JMF. This file also contains instructions for running the sample code thatcomes with the JMF distribution.
Before using Sun's JMF on Solaris, you need to augment two environmentvariables. First, you must add the JMF classes to your CLASSPATH.
% export CLASSPATH="$JMFHOME/lib/jmf.jar:$CLASSPATH"
You must also modify your LD_LIBRARY_PATH
variable so that the JavaVirtual Machine (JVM) can find the native libraries required by the JMF.
% export LD_LIBRARY_PATH="$JMFHOME/lib:$LD_LIBRARY_PATH"
Installing Sun Implementation on Windows
Sun's JMF for Windows 9x and Windows NT is installed using InstallShield.Simply double-click on the downloaded file and the installation begins. Notethe name of the directory in which you install the JMF and set the JMFHOMEenvironment variable to this value. This environment variable is referred tothroughout this Preface.
The following table describes the recommended configuration for usingSun's JMF on a Windows machine.
Up to date installation instructions and system requirements can be foundin $JMFHOME/html/setup.html after you have downloaded and installedthe JMF. This file also has instructions for running the sample code that comeswith the JMF distribution.
Before using Sun's JMF on a Windows machine, you need to augment twoenvironment variables. First, you must add the JMF classes to your CLASSPATH.
c:> set CLASSPATH="&JMFHOME&\lib\jmf.jar;&CLASSPATH&"
You must also modify your PATH variable so that the JVM can find thenative libraries required by the JMF.
c:> set PATH="&JMFHOME&\lib;&PATH&"
Downloading Intel Implementation
Intel's JMF implementation can be downloaded from:http://developer.intel.com/ial/jmedia/JMDownload.htm.
Installing Intel Implementation
The Intel JMF is also installed with InstallShield. The installation is a piece ofcake. You simply double-click on the downloaded file and the installationbegins. The only thing you need to note is the name of the directory in whichyou install. As a convenience, set the environment variable JMFHOME to thisvalue. We refer to JMFHOME throughout this Preface.The following tables describe the minimum and recommended configurationsfor using Intel's JMF.
In addition to these requirements, you will want to have the latest Direct-Drawdrivers for your graphics card.
The EJMF FTP Site: Support Code, Examples
Source code and class files for all the examples presented in the book, as wellas the Essential JMF Toolkit, are available from the Prentice Hall ftp site,ftp.prenhall.com. This site is accessible via anonymous ftp.A single ZIP file contains all the necessary files. In the following discussion,this file is referred to as the "EJMF support code." It is namedejmf_support.zip
Downloading the EJMF Support File
The following sequence of steps illustrates how to download the EJMF supportcode. You type the bold. The computer types the rest.
% ftp ftp.prenhall.com
<type your user name, e.g. username@someisp.net>
Connected to iq-ss3.prenhall.com.
220 iq-ss3 FTP server(UNIX(r) System V Release 4.0) ready.
User (iq-ss3.prenhall.com:(none)): anonymous
331 Guest login ok, send ident as password.
Password:
230 Guest login ok, access restrictions apply.
1 ftp> cd /pub/ptr/professional_computer_science.w-022/gordon/essential_jmf
250 CWD command successful.
ftp> bin200 Type set to I.
ftp> get ejmf_support.zip
200 PORT command successful.
150 ASCII data connection for ejmf_support.zip
(38.11.232.6,1099) (19818 bytes).
226 ASCII Transfer complete.
20184 bytes received in 5.93 seconds (3.40 Kbytes/sec)2
ftp> bye
Goodbye.
Installing the EJMF Support Classes
Before unzipping the downloaded EJMF support file, choose a directory inwhich you will the install Essential JMF support code. This is called the installation directory. When you unzip, be sure you are in this directory.
Once you have unzipped the examples file, set the EJMF_HOME environment variable to point to the installation directory. For example, if you unzip ejmf_support.zip
in /home/me/ejmf
, you would set EJMF_HOME
asfollows.
% export EJMF_HOME=/home/me/ejmf
Or, on a Windows machine:
c:> set EMF_HOME=c:\home\me\ejmf
Within this directory, you will find three major subdirectories. Additionally,the source directory contains a directory for example source and one for Toolkitsource.
CLASSPATH Considerations
The following entries should be added to your CLASSPATH in order to run theexamples and use the Essential JMF Toolkit.
$EJMF_HOME/classes
$EJMF_HOME/src
The latter is not strictly necessary for running the examples, but is requiredif you want to rebuild either the examples or Toolkit class files.
The ejmf.properties File
Some of the examples and much of the Toolkit code use thejava.util.Properties
class to reference property data stored in$EJMF_HOME/classes/lib/ejmf
.properties.
The mixer example from Chapter 24 uses an entry in this file to name thedirectory in which to load and store its session information. If a MIXER_HOMEvalue is defined, it is used as the "current directory" for mixer data files. If it isnot defined, the Java property user.dir
is used.To easily access the media files available with the EJMF support code,place the following entry in the ejmf.properties
file:
MEDIA_HOME=ejmf_home
where ejmf_home
is full path name of the EJMF installation directory.
Building the EJMF Support Classes
Class files for both the examples and the Toolkit are included with the EJMFsupport code so, once installed, you are ready to roll. However, if you need torebuild the class files, you have two options.
Brute ForceThe brute force method dictates that you visit every directory you want builtand type:
% javac -d $EJMF_HOME/classes *.java
This will get the job done, albeit with a little extra typing.
Using GNU make
Alternatively, GNU make files are provided along with the EJMF supportcode. If you want to use these make files, you must either have GNU make orbe willing to get it. You can find information on the GNU Project athttp://www.cfcl.com/free/orgs/DP/P/GNU.html. GNU make can bedownloaded from ftp://prep.ai.mit.edu/pub/gnu/. We used Version 3.76-1of GNU make in our work.
The following make variable must be set for the make files to properlywork. These are set in the file
$EJMF_HOME/src/ejmf/Makefile.master
.
BIN
- The value of this variable should name the directory in which "removefile" and "remove directory" equivalents reside. The BIN
make variable isused in the file $EJMF_HOME/src/ejmf/Makefile.cmd
to point to thedirectory in which these commands reside.
Making the EJMF Class Files
To build the EJMF class files for the examples and the Toolkit, perform thefollowing steps:
% cd $EJMF_HOME/src/ejmf
% make TARGET=all all
The above make command can be executed from within any directorywithin the directory tree rooted at $EJMF_HOME/src/ejmf
to build a subtree.
Cleaning the EJMF Class Files
To clean the EJMF class files, perform the following steps.
% cd $EJMF_HOME/src/ejmf
% make TARGET=clean clean
The above make command can be executed from within any directorywithin the directory tree rooted at $EJMF_HOME/src/ejmf
to clean a subtreeof its corresponding class files.
The README File
The ftp site also contains a README file that resides in the same directoryas the EJMF support file. This file will contain an update history of the examplesource accompanying Essential JMF. Please refer to it to track changes tothe Essential JMF Toolkit.
Reporting Problems
Comments, suggestions, compliments and abuse intended for the authors canbe sent to feedback@phptr.com.
Help From Fellow Travellers
Appendix D, "Resources," contains instructions for subscribing to three JavaMedia-related mailing lists. We encourage you to join the fray.
Some Conventions
A Word About Listings and Code Segments
Code that appears in this book in a numbered listing can also be found amongthe example source code available from the Essential JMF ftp site. Generallya Listing corresponds to either a complete Java source file or a complete Javamethod. In cases where a class or method is excerpted, ellipses will appear atthe beginning and end of the Listing to identify this fact.
In some instances, code snippets will appear in courier but otherwise notoffset from the normal flow of the prose. This is done in short examples toillustrate a very general usage or technique. These code snippets do notappear, as such, as part of any example.
Secret Meaning Behind Typeface Selections
All code listings and output, all method and function names, commands,directories, and all URLs appear in courier.User input appears in bold courier.Special terms, upon their introduction, variables, and parameters to be substitutedfor appear in italics.
Text within figures appears in helvetica.
Weak attempts at humor appear in footnotes
A Thousand Words About Pictures
The class diagrams that appear in this book were all constructed using RationalSoftware's Rational Rose visual modeling tool. They are all constructedfrom the Unified Modeling Language (UML). See Appendix E, "UnifiedModeling Language Notation," to learn enough about UML to understand thediagrams that appear in this book.
A big thanks to Rational Software Corporation for their complementaryuse of Rational Rose. What's in a name? No other modeling tool would havebeen as sweet.
A Word About Sexist Language
We have been very impressed with the sensitivity displayed by some authorsof technical books in their efforts to avoid sexist language in their writing.After all, the computer, that quintessential human expression of masculinerationality and logic, could use a little softening around the edges.
One particularly tortured public display of post-modern sensibilitiesappears in Dan Heller's book The Motif Programming Manual. Mr. Hellerspends nearly 500 words to inform the concerned reader that he (he is a "he")is going to use "he" when in need of a singular pronoun. Like a good cybernaut,Heller then softens the blow with a :( but one is still left with a taste ofpolitical correctness in his mouth.
We, too, struggled with this decision. Many late nights were spent listeningto Lou Reed's "Walk On The Wild Side" ("shaved her legs and then he was ashe/She said, hey babe, take a walk on the wild side") without resolution. Wejust could not "take a walk on the wild side." Our obstinacy, however, hadnothing to do with a secret desire to perpetuate oppressive patriarchal powerstructures or even a failure to adequately deconstruct gender roles.
You see, we went to the source. We did what any two living, white maleswould do: we consulted two dead, white males, Mr. Strunk & Mr. White. Weagree with them when they say: "The furor recently raised about he would bemore impressive if there were a handy substitute for the word" and that the useof "he" for embracing both genders "has no pejorative connotation."
Throughout this book, you will find "he" where you have come to expect it,accompanied by neither apology nor emoticon.
A Footnote
We are going on the optimistic assumption that our readers will complete thisbook as experts in the JMF in spite of stupid footnote humor.