How do I do that? If you don’t already have QuickTime (or iTunes, which includes QuickTime in its install), you can get it from. QuickTime for Java: A Developer's Notebook. Enter your mobile number or email address below and we'll send you a link to download. Specializing in Java, Mac. What’s perhaps more common is that you have QuickTime, but you don’t have QuickTime for Java, which is not installed by default. In this case, you can use the QuickTime Updater to update your copy of QuickTime and install custom pieces like QTJ. If you have the QuickTime icon down in your System Tray, you can right-click it to launch the Updater, as seen in. You can also get to the Updater via Start → Programs → QuickTime → QuickTime Updater. What just happened? The installer installed QuickTime’s various pieces in your system, adding a QuickTime group to your Start Menu, a QuickTime icon in your System Tray, various pieces in C: WINDOWS System32 QuickTime, etc. It puts QTJava.zip in the lib/ext directory of any valid Java installations it finds, adds a systemwide environment variable called QTJAVA with the path to this file, and adds the file’s path to the CLASSPATH system environment variable, creating it if necessary. Shows what this looks like in Windows Explorer. Figure 1-3. QTJava.zip file installed into a Java 1.4.2 lib/ext folder It should be obvious that it’s important to do the installs in the order shown here: Java first, then QuickTime. That way, QuickTime can find the existing Java directories into which to install QTJava.zip. Unfortunately, this can still get messed up if you add another Java Runtime Environment (JRE) later—QuickTime might think QTJ is installed, but the new JRE won’t have QTJava.zip in its lib/ext directory. In this case, copying QTJava.zip manually might be the most practical option. What about.installing QTJ on Linux? The thing that makes QTJ fast and powerful—the fact that it’s a wrapper to an underlying native framework—is also its cross-platform downfall. QuickTime for Java can exist only on platforms that Apple develops QuickTime for, and right now, that means Mac and Windows. On the other hand, if Apple ever did port QuickTime to Linux, bringing QTJ along for the ride probably wouldn’t be hard. And what about installing QTJ on (Classic) Mac OS? QTJ was originally developed on and for Mac OS 8 and 9. It is part of the standard QuickTime install for Mac OS and thus gets picked up as part of a regular update (which you’d launch with the QuickTime Settings control panel, under the Update Check section). On Classic, the QTJava.zip file lives in System Folder/Extensions/MRJ Libraries/MRJClasses (yes, there’s a space in MRJ Libraries, but not in MRJClasses). Note MRJ means Macintosh Runtime for Java, the name of Classic’s JRE. The name and its confusing versioning were dropped for OS X. However, development of QuickTime for Classic stopped at Version 6.0.3 and does not include the much-changed version of QTJ that this book covers, QTJ 6.1. Furthermore, it’s worth remembering that Java on Classic Mac OS never got past Java 1.1.8, which means it doesn’t include Swing, Collections, or many other J2SE classes and conveniences that modern Java developers would expect to be present. Where’s the API documentation? Even though QTJava.zip is all you need to compile, some documentation and demos would be really helpful, right? The good news is that there is a QTJ SDK that offers Javadocs and demos. Unfortunately, much of what’s on Apple’s web site as of this writing refers to an earlier version of QTJ that won’t work with Java 1.4 on Mac OS X. The most complete SDK right now is labeled as the “QuickTime for Java Windows SDK,” and is located. This package contains a complete set of current Javadocs and demos that have been updated to represent the new API calls in QTJ 6.1. You can also view the Javadoc online. Tip When you look at the Javadoc, many methods will have a boldface reference to their equivalent C function. For example, Movie.start( ), which starts playing a movie (see the next chapter), wraps the native function QuickTime::StartMovie. You can usually find the native documentation by doing a search on Apple’s page for the function name or by Googling for it with a search term like site:apple.com StartMovie. Why would you ever look at the native docs when you’re programming in Java?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
September 2018
Categories |