Saturday, August 14, 2010

Programming Language whose write JVM

This post is pasted from my previous blog posted 15 June 2008.

One of interesting point that is considered as the advantage of Java programming language is its portability. The jargon for that ability is really famous. Write once run anywhere (WORA). Although it will be needed hard work to write code which is really portable, I think the statement is not too exaggerate. Since it design phase, Java is prepared to be much portable. We can see the fact surround us. There are so many Java. In our computer desktop, laptop, expensive server, standard mobile phone, PDA, set top boxes and many more.

For who has read several first chapter of Java introductory book will know how that portability will be achieved. Different than former programming language, Java offer different approach in developing code. Running code in Java is consist of two phases which are, compiling source code and interpreting it’s result. Compiling phases use javac tool which change java source code with .java extension into intermediate code named bytecode with .class extension. Later this bytecode will be interpreted by java tool so we get the software run.

Different than other programming language, bytecode is not run straight above operating system or platform. Bytecode run over stuff called Java Virtual Machine (JVM). At that stuff .class file is interpreted a.k.a run by java.exe (in windoze) tool . Various platform has it’s own JVM. Windoze has its JVM, so that Linux, Solaris and other operating system. Also mobile phone, PDA, set top boxes has JVM. That’s why bytecode can run in various place and the portability is really approachable.

The question is, who act as a tittle of this post, what programming language has written that JVM. I believe rarely introductory java book will discuss much about inner mechanism of JVM. Several complex hardware level or compiler construction book perhaps will have wide portion for this topic. But I will prefer go to cinema and watch fun movie rather make my head dizzy reading such book.

So what the answer? This post will be useless by asking without answering. Ok here you go. After reading one of Good rarely Introductory Java book like I said above (the title is Java in 60 minutes A Day by Rich Rapossa from Willey) I found that JVM is written by C++. After all of advantage is offered by Java it still have to admit superiority of old complex difficult of C++. Yeah when reach the necessity of speed and hardware accessing such as needed by JVM, C++ is always needed.

My mind then imagine, if later there will be new programming language is founded. Let’s call that Sumatera programming language (Sumatera is another island in Indonesia such Java). Sumatera run above Virtual machine called Sumatera Virtual Machine (SVM). SVM abruptly coded by Java. And JVM coded with C++. I thing only crazy people will create that.

Just joke.

No comments:

Post a Comment

Post a Comment