Java is Platform Independent which means it can run on any Operating System.Since this is impossible across processor architectures Java is compiled to an intermediate form called byte-code. A Java program does not executes on the host machine. But a special program called the Java interpreter reads the byte code and executes the corresponding native machine instructions. So to port Java programs to a new platform all that is needed is to port the interpreter and some of the library routines. The compiler is also written in Java. The byte codes are so called because each instruction is of one byte.
The second important part of making Java cross-platform is the elimination of undefined or architecture dependent constructs. On this platform integers are always four bytes long. No need to worry that the meaning of an integer is going to change if you move from a Pentium to a PowerPC. Everything is guaranteed in Java.
The second important part of making Java cross-platform is the elimination of undefined or architecture dependent constructs. On this platform integers are always four bytes long. No need to worry that the meaning of an integer is going to change if you move from a Pentium to a PowerPC. Everything is guaranteed in Java.







No comments:
Post a Comment