Skip to main content

JVM & Byte Code

JVM is the main component of Java architecture and it is the part of the JRE (Java Runtime Enviroment) .It provides the cross platform functionality to java. This is a software process that converts the compiled Java byte code to machine code. Byte code is an intermediary language between Java source and the host system. Most programming language like C and Pascal converts the source code into machine code for one specific type of machine as the machine language vary from system to system . Mostly compiler produce code for a particular system but Java compiler produce code for a virtual machine . JVM provides security to java. 

The programs written in Java or the source code translated by Java compiler into byte code and after that the JVM converts the byte code into machine code for the computer one wants to run. JVM is a part of Java Run Time Environment that is required by every operating system requires a different JRE .
Ques 2:- JVM provides portability explain..? 
Implementations of java specification for a variety of CPUs and architectures provides the feature of portability. Foremost, without the availability of a JRE for a given environment, it is impossible to run Java software.JVM forms the part of large system i.e. the Java Runtime Environment (JRE). Each operating system and CPU architecture requires a JRE. JRE consists of a set of base classes i.e. an implementation of the base Java API as well as a JVM. The byte code format is same on all platforms as it runs in the same JVM and it is totally independent from the Operating System and the CPU architecture.
JVM is java interpreter as it converts the byte code into machine code for the computer one wants to run. 
JRE consists of a number of classes based on JavaAPI and JVM, and without JRE, it is impossible to run Java. So its portability really made it possible in developing write once and run anywhere software .

public class HelloWorld
{
public static void main(String arr[] )   {
System.out.println(" Hello World !");
}  }

  

Comments

Popular posts from this blog

Step-by-Step guide for Installing MySQL on Windows

Step-by-Step guide for Installing MySQL on Windows Y ou can download the MySQL database from the MySQL website http://www.mysql.com by clicking on the downloads tab. Scroll down to the MySQL database server & standard clients section and select the latest production release of MySQL, 5.1.35 at the time of writing. Installation of MySQL Server: Unzip the setup file and execute the downloaded . MSI file. Follow the instructions below exactly when installing MySQL Server: Click on the "setup" MySQL Installing Type There are three type of MySQL Installation:- Typical  This MySQL installing process install the  MySQL server,command- line client and command line utilities. This command line and command client included in mysqldump, myisamchk and several tools to manage the MySQL Server. Complete By this installation type we install all the component included in the installation package. And this package include the component such as suppor...

How to Grant Privilages to an account in MYSQL

MYSQL 'GRANT' statement allows you to grant access privileges to database account. To achieve same ,syntax  is as follow: Syntax:- GRANT privileges [Column_List] ON  [Object_Type] Privilege_level To account [IDENTIFIED BY 'password'] [ REQUIRE encryption ] WITH with_option ; Detailed explanation: Privileges:- It indicates that you have assign privileges to account. column_List : - (1) Its  optional.                          (2) Column(s) to which privileges apply. Privileges_level :- Level at which privileges apply. You can use global  privileges,database privileges,table specific privileges, column privileges etc. Account :- Which  account is being granted privileges. Password: - Specifies password.It replace old password. Required:- Clause specify whether the account has to connect to database server over secure connec...

Exception Handling (RunTime Error)

Java Error Handling: In general, errors can be broken up into two categories: Design-time errors and Logical errors. Design-time errors are easy to spot because NetBeans usually underlines them. If the error will prevent the programme from running,   NetBeans will underline it in red. Logical errors are the ones that you make as a programmer. The programme will run but, because you did something wrong with the coding, there's a good chance the entire thing will crash. You'll see examples of run-time errors shortly. You'll also see how to handle them. But first a word on how Java handles errors. Exceptions What is an exception? An Exception can be anything which interrupts the normal flow of the program. When an exception occurs program processing gets terminated and doesn’t continue further. In such cases we get a system generated error message. The good thing about exceptions is that they can be handled. When an exception can occur? Exception can occur at run...