On Mon, Sep 25, 2000 at 11:59:06PM -0700, Zimran Ahmed wrote:
>
> finally, one question to the group: if java applets are precompiled, then
> why have then in Java at all? why not just write them in C which runs
> faster on smaller memory.
Java source gets compiled to JAVA byte code. This byte code is not native
machine code for any particular device, but rather a machine independant
byte code. It is however native machine code for a Java Virtual machine.
Its called a VM because it lives ontop of a normal machine. Basically the
VM is just a program which runs native on a machine and is able to interpret
the java byte code. The fact that you can write a VM for any machine makes
java byte code "portable". Think of Java byte code as really just machine
optimised source code (ie not humanly readable) but the VM can interpret it
faster than if just interpreting java source code.
You could write java in C if you could compile the C program in to Java
byte code, but it would still have the same performance as the Java code.
Python is another language which can be compiled into Java byte code also.
Hope you're all feeling very confused now :)
Tom.
--
Thomas O'Dowd Have you had your noop today?
tom_at_nooper.com http://www.nooper.com
Received on Tue Sep 26 07:15:57 2000