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: java ?



On Thu, 21 Jun 2001, John Buell wrote:

> I thought that AWT and Swing were in all versions of Java, and it was just the
> way the JDK/JRE was written into OS X that made them dependent on Carbon. You
> SHOULD be able to get AWT and Swing to work in a version of X on Darwin,
> provided you've got a compatible VM, shouldn't you? (my point being that it's
> not really AWT/Swing that's the issue, it's getting a Darwin-only VM instead
> of a Darwin/OS X VM, which is what's actually installed in X). Or am I off
> the mark here?

Well, yes, if you have a virtual machine that works on your platform, then
Java will work. ;-) Most likely AWT's peer classes are implemented with
Carbon code. (Wouldn't it make more sense to do this with Cocoa? I guess
it's less work. But Cocoa is supposed to be good for RAD, right?) Swing is
lightweight, so it doesn't require any native code (it's implemented in
Java). I don't know if any other packages have peer classes.

<sorta rant>
I'm really not sure why Sun doesn't have more heavyweight stuff, as it
should be faster (maybe it's not?). I can understand the desire to avoid
native code, but why not write them in Java, then convert them to native
code (or compile them into native binaries as opposed to bytecode). If you
could compile them once and cache the resulting code somewhere, that could
significantly speed up Java. (I don't mean avoid bytecode, I mean write
Java, compile it into bytecode, and distribute it. Then when the user runs
it, any code they run is compiled via a JIT compiler (libraries could be
compile with a "real" compiler), and is cached somewhere. When they want
to run it again, it's already compiled so they avoid interpreting it.
</sorta rant>

Daniel

--
maybe it will snow


References: 
 >Re: java ? (From: John Buell <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.