Bytecode and JVM

Java is a most popular programming language. It follows Object Oriented Programming paradigm. The one of the reason for its popularity is Internet.Internet is a networks of networks connected together, which contains machines of different kind which have different architecture, different platforms. And above all Internet where its most terrific draw back is it security problem. In order to overcome all of the above versatile condition needed programming language whose programs should be portable, architectural and platform independent, and secured from attacks.
As it states that Java is compiled and interpreted language. The compiled code(program) of Java is not a executable code. It is a set of highly optimized instructions. This optimized instruction are interpreted by spacial virtual machine to run the program. This compiled code is called Bytecode and the virtual machine is called Java Virtual Machine(JVM). So the programmer use the Java language to create the program and compile. The program is compiled in to Bytecode. That code is interpreted by JVM, and, only JVM can understand it.
So from above one can assume how the security and portability(for running on different machine,mostly on Internet) can achieve. That is the machines which have the JVM only can interpret the Bytecode. The intruder cannot understand the instructions in Bytecode. So it is secured.
The machines which have JVM can interpret the code. So any machine on Internet having the JVM run the program created using Java.It is not matter which platform the machine has and what its architecture is. JVM is also known as Java run-time package whose details differ from platform to platform.
There is a program which is small and can be transmitted over Internet and automatically executed by Java compatible web-browser. The program is called Applet. Applet is self executable file which is downloaded from Internet on demand, it is a dynamic and self executing program. The information or data in it is provided by server for client machines. To run this program the machine should have JVM.

No comments: