| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
On Nov 24, 2005, at 1:07 AM, email@hidden wrote: I use code from Chis's Developers Notebook (the BasicQTEditor) and the Java upgrade for Tiger broke it. What happens is, it opens properly but cannot open a video. Executing the following from the book's "code" directory works fine for me: [chrisg5:books/qtj developer's notebook/code] cadamson% /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java -classpath classes com.oreilly.qtjnotebook.ch02.BasicQTPlayer Just to ack versions with you: [chrisg5:books/qtj developer's notebook/code] cadamson% /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java -version java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83) Java HotSpot(TM) Client VM (build 1.5.0_05-48, mixed mode, sharing) Note that if you use the ant tasks (like ant run-ch02-basicqtplayer), you'll pick up Java 1.4.2, not the new J2SE 5.0. What's not working? Do you get an error message? Do you not get the file selector? Do you get the selector but it won't play your video? Have you tried other files (and/or, does the video you're trying to play work in QuickTime Player)? System.setProperty("com.apple.eawt.CocoaComponent.CompatibilityMode", "false") I don't believe that's necessary, since the book's code really does work in J2SE 5.0, but if you wanted to use the above system property, you'd want to set it as early as possible. Two ways to do that: 1. Put it in a static initializer in the class with the main() method. That will ensure it's run *before* main(). After your class declaration, and outside of any methods, do: static { System.setProperty (...); } 2. Put it on the command line with a -D argument, like java -Dcom.apple.eawt.CocoaComponent.CompatibilityMode=false If it's in your code, Windows will ignore it, so you don't need to do anything special there. --Chris |
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-java mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quicktime-java/email@hidden This email sent to email@hidden
| References: | |
| >New Java Breaking Stuff (From: email@hidden) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.