[EMAIL PROTECTED] wrote:
>Nice quick virtual machine 101 ;)
>
>Anyway, I think Java doesn't fall in the compile-link tandem as
>with in other systemrs because after building bytecode for each class
>(compile), the classes don't need to be linked into a specific executable
>format since each class is a potential entry point -- the Java runtime
>only looks for a methond with a specific signature (public void main(
>String[] args ) )
True. AFAIK, Java bytecode is interpreted directly via the Java interpreter.
Maybe I should've added a more appropriate example with regards to interpreted
languages (ie. Fortran77). F77 code is interpreted directly by the interpreter
to be executed by a specific architecture. java bytecode, on the other hand,
is interpreted to be executed by the "java architecture" (the java virtual
machine), which is port-specific in nature (and successfully hides the
intricacies of the underlying hardware with a common API across architectures).
Machine-dependent compiled languages (ie.C, C++, Pascal) fall in:
compiler linker |---------|
source code -------> object code ------->machine executable code |processor|
(architecture specific) (architecture specific) |---------|
Interpreted languages (ie. Fortran77, Perl) fall in:
interpreter |---------|
source code -----------> machine executable code |processor|
(I think it's architecture specific)|---------|
Java gurus: please correct me on this:
Java on the other hand does this (I think...)
compiler (javac) interpreter (java) |------|
source code ---------------> byte code ------------------> JVM code | JVM |
(architecture neutral) (we don't see |------|
this normally, |
as this is done |
inside the JVM) |
|
|
|
Dunno, pero it looks |
like this anyway: |
JVM-specific routines |
low-level translation |
v
|---------|
|processor|
|---------|
Correct me if I'm wrong on this (as I only had used Java in my programming
language course. And that was last year. I'm basically a rabid C++ user all
this time...)
I'm not sure if Python also implements a Virtual machine too like Java.
I think compilers and interpreters are mostly architecture specific, as you
need a port of them in a specific architecture to compile or interpret source
code.
Please any corrections would help me much!
Paolo Alexis Falcone
____________________________________________________________________________
"But if you look carefully at their [Microsoft's] encryption algorithm, they
simply XOR the password with 'susageP', Pegasus spelled backwards. Pegasus
is the code name of Windows CE. This is so pathetic it's staggering."
Bruce Schneier in http://www.counterpane.com/crypto-gram-9911.html
__________________________________
www.edsamail.com
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]