Monday 3 September 2012

9.Why Java is platform independent


Java is a set of several computer software products and specifications from Sun Microsystems (which has since merged with Oracle Corporation), that together provide a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones on the low end, to enterprise servers and supercomputers on the high end. While less common on desktop computers, Java applets are sometimes used to provide improved and secure functions while browsing the World Wide Web.
Writing in the Java programming language is the primary way to produce code that will be deployed as Java bytecode.


 There are, however, bytecode compilers available for other languages such as Ada, JavaScript, Python, and Ruby. Several new languages have been designed to run natively on the Java Virtual Machine (JVM), such as Scala, Clojure and Groovy. Java syntax borrows heavily from C and C++, but object-oriented features are modeled after Smalltalk and Objective-C. Java eliminates certain low-level constructs such as pointers and has a very simple memory model where every object is allocated on the heap and all variables of object types are references. Memory management is handled through integrated automatic garbage collection performed by the JVM.

Java Virtual Machine


The heart of the Java platform is the concept of a "virtual machine" that executes Java bytecode programs. This bytecode is the same no matter what hardware or operating system the program is running under. There is a JIT(Just In Time) compiler within the Java Virtual Machine, or JVM. The JIT compiler translates the Java bytecode into native processor instructions at run-time and caches the native code in memory during execution.



The use of bytecode as an intermediate language permits Java programs to run on any platform that has a virtual machine available. The use of a JIT compiler means that Java applications, after a short delay during loading and once they have "warmed up" by being all or mostly JIT-compiled, tend to run about as fast as native programs.Since JRE version 1.2, Sun's JVM implementation has included a just-in-time compiler instead of an interpreter

Although Java programs are cross-platform or platform independent, the code of the Java Virtual Machines (JVM) that execute these programs is not. Every supported operating platform has its own JVM.


Best Study Materials JAVA,
Java Tutorials PDF,
Java SCJP Questions,
Java Material Free Download,
Gate Study Material Free,
Java Tutorial Download,
SCJP Materials
Core Java Programming Questio…
SCJP Certification  

Er Ratnesh Porwal
Software Engineer
www.AeroSoftCorp.com
www.AeroSoft.in
www.AeroSoft.co.in
www.AeroSoftseo.com
On Line Assistence    :
Gtalk                          :   ratnesh.aerosoft@gmail.com
Y! Messenger              :  ratnesh.AeroSoft@yahoo.com
Rediff Bol                    :  ratnesh.AeroSoft@rediffmail.com

No comments:

Post a Comment