Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » FundamentalRSS Feeds

Bytecodes and Java virtual Machine

Posted By: Sophia Hughes     Category: Java     Views: 4328

This article explains bytecodes and java virtual machine features.

What is Bytecode? And purpose of bytecodes.

Java is platform-independence and it is achieved using bytecodes. There are basically 2 forms of programs exists i.e. source code and object code.
Source code is nothing but the textual version of the program that we write using a text editor.    
Object code is an executable form of a program. It can be executed by the computer and it is specific to a particular CPU. Therefore, it cannot be executed on a different platform.

To remove this restriction java compiler produces an object file that contains bytecodes instead of producing executable code. Bytecodes are instructions that are not for any specific CPU.   

What is Java Virtual Machine? And purpose of JVM.

Java virtual machine is nothing but a virtual machine that runs the java code. 
Bytecodes are designed to be interpreted by a java virtual machine. Java becomes platform-independence due to the fact that the same bytecodes can be executed by any JVM.

If JVM is implemented for a given environment, it can run any java program.
For example, Java programs can be executed under Windows 98, IRIX, Solaris etc for which a JVM has been implemented. 
  
Share: 


Didn't find what you were looking for? Find more on Bytecodes and Java virtual Machine Or get search suggestion and latest updates.

Sophia Hughes
Sophia Hughes author of Bytecodes and Java virtual Machine is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!