The code I am compiling is example one from Chris Adamson's book
on QTJ
where he says that -classpath needs to be set.
Chris is correct: -classpath is required. I just tried it myself,
and was
surprised to find that 'javac' won't honor QTJava.zip as an installed
extension. My surprise is due to the fact that 'java' DOES honor
it as an
extension. This was on 10.4.3, with Java version 1.4.2_09-232.
Given this situation, you should add QTJava.zip to your Xcode
project. The
compiler should then be able to refer to the JAR, and the classes it
contains, as a library. It's conceivable that Xcode won't do this for
zip-suffixed files, which it will do for jar-suffixed files, because I
haven't tried this with a .zip file.
The idea with Xcode is that you put things like library-jars into the
project and they are then compiled against (and optionally merged into
output). That is, a JAR-file is logically equivalent to compiling
against
a framework. This way you shouldn't have to mess around with
changing the
compiler's classpath, as Xcode should just interpret the presence
of the
library-jar as a request to put it in the compiler's classpath. I
know
this works with ".jar" files; I don't know if it works with ".zip"
files.
BTW, there's no reason I can think of why the QTJava archive is
suffixed
with ".zip" instead of ".jar". It makes more sense for it to be
".jar",
but there's probably some historical reason behind ".zip", even if
that
reason no longer applies. Filing a bug-report with Apple may lead
to a
change. Or not, if there's some hysterical raisining.
-- GG
Hi Greg and Michael
First i have added the file to the project and it is running so thank
you very much Greg
In an answer to Michael's comments I have a receipt showing that I
have installed J2SE5.0 via software update, but I haven't done
anything to set it as the default compiler, so if the installer
didn't do it then i am still running 1.4.2. If am am still running
1.4.2 then some instructions as to how to swap to 1.5 would be very
useful.
Russell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden