• Java is a programming language originally developed
by James Gosling at Sun Microsystems.
• The language derives much of its syntax from C and C+
+ but has a simpler object model and fewer low-
• Java applications are typically compiled to byte code
(class file) that can run on any Java Virtual
Machine (JVM) regardless of computer architecture.
• Before understanding what is JVM let us first
know what virtual machine is.
• A virtual machine is a layer of abstraction that
gives a program one simplified interface for
interacting with a variety of physical computers
and their operating systems.
Java virtual machine
• As the name indicates, JVM is not a real hardware
machine but a software layer which resembles an
• JVM converts Java byte code into machine language
and executes it.
• The byte code can be executed on any platform where
there exist JVM.
• JVM‘s are available for many hardware and
• The use of the same byte code for all JVM’s on all
platforms allows Java to be described as a "write once,
run anywhere" programming language.
• Thus, the JVM is a crucial component of the Java
Components of JVM
1. Byte code verifier
2. Class loader
3. Execution engine
4. Garbage collector
5. Security Manager
Byte code verifier
• As the name suggests, bytecode verifier is used to verify
• Bytecode verifier checks for unusual code.
• Byte code verifier is a crucial component for security.
• Class loader loads java classes into java virtual machine.
• All Java virtual machines include one class loader that is
embedded in the virtual machine.
• The main feature of the class loader is that JVM.
doesn’t need to have any knowledge about the classes
that will be loaded at runtime.
• Class loader reads bytecode and creates the instance of
• The execution engine helps JVM to convert bytecode
into machine code.
• It has two parts:
• Execution engine is responsible for executing the
instructions contained in the methods of loaded classes.
• Garbage collection is the process of automatically
freeing objects that are no longer referenced by the
• It periodically check for the object on heap , whose link is
broken so it can collect garbage from heap.
• Garbage collection relieves java programmer
from memory management.
• Security manage constantly monitors the code.
• It is special java object that is responsible for guarding
security policies for java applications.
• It is always consulted before any potentially dangerous
operation is requested by a java application.
• Java Virtual Machine (JVM) is platform independent,
meaning it can run on different Operating Systems (OS)
like Windows or UNIX.
• JVM does not really exist but is created within another
• As long as a JVM is available natively to a system, a
Java program can run in the system.
• The JVM stands on top of the operating system (OS),
which means it is independent of the OS.
• Cross Platform
• Platform Specific Features
Notas do Editor
Interpreter and JIT (just in time) Compiler which convert the byte code instructions into machine language so that processor can execute them.
One advantage to using the Java virtual machine (VM) is that the virtual machine attempts to verify all programming before it runs for malicious activity, and even serious errors within a Java program are confined to the virtual machine's sandbox A tremendous advantage of the Java VM is that it allows a program to be written and compiled only once, which then can be run on a wide variety of systems and operating systems without modification. Many cell phones and embedded devices include a Java VM. Dis Since programming must be translated from generic &quot;byte code&quot; to the machine code for the target system as it is being run, it is impossible for Java to perform as quickly as languages that can compile directly to machine code for the target systems. Because the Java VM must run on a wide variety of systems, features specific to one OS are often not implemented into Java programs. In addition, the &quot;look and feel&quot; of Java applications can often be quite different than the default styles of native applications within an operating system.
Parece que tem um bloqueador de anúncios ativo. Ao listar o SlideShare no seu bloqueador de anúncios, está a apoiar a nossa comunidade de criadores de conteúdo.
Atualizámos a nossa política de privacidade.
Atualizámos a nossa política de privacidade de modo a estarmos em conformidade com os regulamentos de privacidade em constante mutação a nível mundial e para lhe fornecer uma visão sobre as formas limitadas de utilização dos seus dados.
Pode ler os detalhes abaixo. Ao aceitar, está a concordar com a política de privacidade atualizada.