22
JVM JRE JAVAC Are the main part for the java program Presented by Infocampus software Training Institute

JVM, JRE and Javac are the main part for the java program

Embed Size (px)

Citation preview

JVM JRE

JAVACAre the main part

for the java programPresented by Infocampus software Training Institute

JVM

JVM is known as Java Virtual machine.It is an interpreter .Java Virtual Machine is an abstract machine.

It provides the runtime environment in which java bytecode can be executed.

JVM is platform dependent so it is available for many hardware and software.

Best core java training in bangalore

What is JVM?

Infocampus Software Training institute

[1] JVM is a specification where working of Java Virtual Machine is specified.

But implementation provider is independent to choose the algorithm. Its implementation has been provided by Sun and other companies.

Specification

Implementation

[2] JVM is an implementation Its implementation is called as JRE (Java Runtime Environment).

Java/j2ee classes bangalore

Runtime Time Instance

[3] JVM is a Runtime Instance Whenever we write java command on the command prompt to run the java class, an instance of JVM is created.

Java course in bangalore

Workingof

JVM:

Advance java training in bangalore

The JVM performs following works :

1)Loads the java code

2)Verifies the code

3)Executes the code

4)Provides runtime environment

Architecture of JVM

1) Classloader:It is a subsystem of JVM which is used to load the class files.

2) Class Area(Method Area):Class Area stores per-class structures such as the runtime constant pool, field and method data, the code for methods.

Java course in bangalore

[3] Execution Engine :Execution Engine contains :

i) A virtual processor

ii) Interpreter: Read bytecode stream then execute the instructions.

iii) Just-In-Time(JIT) compiler: It is used to improve the performance.JIT compiles parts of the byte code that have similar functionality at the same time,and hence reduces the amount of time

needed for compilation.

JRE Java

Runtime environment

It is used to provide runtime environment to java program.

It is the implementation of JVM. It physically exists.

It contains set of libraries and other files that JVM uses at runtime.

Java training center bangalore

JavacIt is the primary Java compiler included in the JDK(Java Development Key) .

Javac is itself written in java .The compiler can also be invoked programmatically.

Infocampus Software Training Institute

The compiler accepts source code conforming to the Java language specification JLS) and generates bytecode conforming to the Java Virtual Machine Specification (JVMS).

Working of Javac

- The javac command compiles Java source code (.java file)into Java bytecodes (.class file). we then use the Java interpreter to interprete the Java bytecodes.

Java Training in bangalore

- Java source code must be contained in files whose filenames end with the .java extension.

The file name must be having the class name, as classname.java, if the class is public or is referenced from another source file.

Infocampus Software Training Institute

- For every class defined in each source file compiled by javac compiler, the compiler stores the resulting bytecodes in a class file with a name of the form classname.class.

- When the compiler must refer to your own classes you need to specify their location. Use The classpath option or CLASSPATH environment variable to do this.

- Class path is a sequence of directories (or zip files) which javac searches for classes not already defined in any of the files specified directly as command arguments.

- The compiler looks in the class path for both a source file and a class file, recompiling the source (and regenerating the class file) if it is newer.

This is the short description about the JVM ,JRE and Javac .

To know more about the java for developing purpose or getting a jobas java developer join Infocampus Software Training Institute for the java course.

Infocampus Software Training Institute

CONTACT DETAILS

#12, 1st

& 4th

Floor,Outer Ring Road,Kalamandir RoadAnand Nagar,Marathahalli,Bangalore,Karnataka 560037

CONTACT INFOCAMPUS

@

9738001024

ENQUIRE AT:

http://www.infocampus.co.in/java-training-bangalore.html

THANKYOU