Hi,
I came to know that JRE /JVM was not built using Java. The Sun JRE was built in C and IBM JRE was built in SmallTalk (First Object Oriented Language). Pleas help me with answer. Thanks in advance.
Hi,
I came to know that JRE /JVM was not built using Java. The Sun JRE was built in C and IBM JRE was built in SmallTalk (First Object Oriented Language). Pleas help me with answer. Thanks in advance.
There were already compilers that turn C into machine code. Compilers that turn Java into machine code didn't come until much later, and are still not as capable or optimized.
AFAIK, I think it mainly comes down to efficiency and portability. Although writing the JRE/JVM with Java might be portable, it would not be very efficient as there are a few translations to get to the machine level instructions (Eg. Java bytecode -> platform instructions -> machine instructions). The beauty of writing programs in ANSI C is that programs generally are quite fast, and the code can be compiled on most platforms.
When you are bootstrapping a language you have to start somewhere. Many languages (Python, Ruby, etc) start with a C-based implementation - perhaps because C affords an efficient implementation as well as easy access to the underlying OS API calls.