Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QTJ deployment strategies



It may not be simple, but I don't think it's nearly as difficult as you make out. How about this for a strategy:

a) Check if you can load an QTJava class in a try..catch block (eg. Class.forName("quicktime.QTSession")

b) If you can, well and good, just carry on (this covers the Macintosh case, and most Windows systems if the user installed Java before QuickTime, as your release notes doubtless recommend they do, except in your case where you make things difficult by providing your own JRE :-)

c) In the unlikely event that b) failed, attempt to locate QTJava.zip by looking in the likely places and appending that to your classpath. In order, look for a QTJAVA environment variable, look in c:\Program Files\QuickTime\QTSystem (or whatever the QT7 default is), then c:\windows\system32 (or whatever the QT6 default is). File.exists() is a useful method in this context.

d) If you still can't find it, display a message "You must install QuickTime. Please visit www.apple.com/quicktime/download", and exit.

Remember, just because users *might* specify a different path for QuickTime doesn't mean they will - in my experience they're VERY unlikely to do anything other than hit OK (without even reading the messages displayed), never mind consciously selecting something different to the default!

And are you saying that if there's no Java installed, the QuickTime installer definitely does NOT set the QTJAVA environment variable, or are you just hypothesizing that it *might* not? Have you tried it? I'd be very surprised if it doesn't, though I could of course be wrong.

My advice would be to quit worrying about the 0.05% of cases that *might* fail and concentrate on delivering something that works with the minimum of fuss for the other 99.95% of cases.

-Rolf

At 1:17 am -0700 14/10/05, Alex Shaykevich wrote:
Right, it does get installed somewhere, at the very
least in /Quicktime/QTSystem.  But, at installation
time, the user could choose any possible installation
path, C:\Program Files\Quicktime, C:\Quicktime,
C:\Something Else\Quicktime, etc...

So, how is my application supposed to find it?  There
is no comparable, PATH-TO-QUICKTIME ENV var.

The QTJava ENV var is being set if there is a
pre-existing Java installation, but what if there
isn't?  Ideally, the QTJAVA ENV var should be set to
/Quicktime/QTSystem/QTJava.zip by the QT installer
itself.

The only hope is that if there isn't a current Java
install, the QT installer is smart enough to still set
QTJava to /Quicktime/QTSystem/QTJava.zip, but I'm not
optimistic.

This is not that simple an issue.

Appreciate your feedback.

--Alex



-- Rolf Howarth Square Box Systems Ltd Stratford-upon-Avon UK. http://www.squarebox.co.uk _______________________________________________ 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: 
 >Re: QTJ deployment strategies (From: Alex Shaykevich <email@hidden>)



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.