› Well-known Java Virtual Machine.

› Addresses on vast small devices. › Reduces some VM features to fit resource-

constrained devices.

JCVM (Java Card)
› Addresses on smart cards. › It has least VM features.



  JVM system is an interpreter. › An instruction set and the meaning of those instructions – the byte codes › A binary format – the class file format › An algorithm to verify the class file . Java virtual machine is a software system that translates and execute java byte code.

If the Byte code is affected. which is a collection of Byte codes. these are recognized by the JVM and not allowed to be executed. . When a java source file is compiled. There is a built-in support for networking. Bytes code are least affected by virus as compared by executable files. objects are stored. a class file is generated. and methods are stored in memory.       The memory addressing is implemented and controlled by java virtual machine (JVM). These are later changed to native code by JVM. Memory addressing mean where the variables are created. Java has built-in support for exception handling. It has built-in support for multithreading application development. Byte codes are portable.

Class files Class loader subsystem Method Area Heap Java Stacks PC Registers Native method Stacks Runtime data areas Execution Engine Native method interface Native method libraries JVM Architecture .

. then the class file can not be executed.  It transforms symbolic reference into direct reference. because they take memory from method area.  Static variables are treated as class variables. Method Area  It is a logical memory component of JVM.  It checks the correctness of the class file. Class loader Sub-System performs its task in a sequential way:  It loads a class file . If any one has manipulated the class file. 2.1.  This logical section of memory holds the information about classes and interfaces.  It allocate memory for static variables.  It sets the default value of all static variable.

 For execution.  .3.  JVM through the use of new operator allocates memory from the heap for an object.  This purpose is fulfilled by java stack. 4. memory is allocated to them from heap. Heap When object or array is created. a method needs memory because of local variables and the arguments it has taken. JAVA Stack  Method codes are stored inside method area.  The JVM has a demon thread known as Garbage Collector whose task is to free those objects from heap whose reference is not alive in stack.

Execution Engine  Generate and executes the java byte code. 6. . 7.  The libraries required for the execution of native methods are available to the JVM through Java Native Interface. Program counter register  It keeps track of the sequence of the program.5. Native method stack  When a java application invokes a native method. that application does not only use java stack but also use the native method stack for the execution of native methods.  It contains an interpreter and Just In Time compiler.  Pc register holds the address of the instructions to be executed next.

Java Native interface JNI is used when the programmer has already developed the code in c/ c++ and wishes to make it accessible to java code. Native methods accesses JVM features by calling JNI functions. JVM can add support to JNI without affecting other parts of virtual machine. JNI never imposes any restriction on JVM.     .8.

class) Java byte code (moves locally or via web) Java Platform Linux Win32/NT Hardware Solaris .java) Java Compiler Java Byte code (*.Java Source (*.

Java compile-time Environment Compile-time Environment Compile-time Environment Class Loader Java Class Libraries Java Source (.class ) Operating System Hardware .java) Java Byte codes move locally or through network Byte code Verifier Java Interpreter Just in Time Compiler Java Compiler Java Virtual machine Runtime System Java Byte code (.

. which is interpreted by the resident JVM. › code is compiled to byte code. › JIT (just in time) compilers attempt to increase speed. Java is platform independent only for the reason: › Only depends on the Java Virtual Machine (JVM).

Reducing the size of the virtual machine and class libraries themselves. To meet the market need for a very small footprint Java implementation. Allowing for components of the virtual machine to be configured to suit particular devices (for example. the KVM was designed to overcome three key technical challenges: 1. 3. by allowing pluggable garbage collection). 2. Reducing the memory utilized by the virtual machine during execution. .

J2ME is a new edition of the Java 2 platform targeted at consumer electronics and embedded devices. This typically applies to digital cellular phones. pagers. So named because its size is measured in the tens of kilobytes. mainstream personal digital assistants.   The KVM is the core of the Java 2 Micro Edition (J2ME). and small retail . the KVM is suitable for 16/32-bit RISC/CISC microcontrollers with a total memory of no more than a few hundred of kilobytes and sometimes less than 128Kbytes of RAM. lowend analog set-top boxes.

it requires only a few tens of kilobytes of dynamic memory to run effectively. depending on target platform and compilation options. Because of the reduced VM size and memory utilization.In addition to the K virtual machine's small object size. even with total memory available of only 128K the K virtual machine enables useful Java technology-based applications to run on a device.   The results of the careful design and implementation are readily apparent: Reduced VM Size .the K virtual machine is currently only 50-80 K of object code in its standard configuration. Reduced Memory utilization . .

 Portability .the K virtual machine is able to run effectively on 16 bit processors clocked as low as 25 MHz.although implemented in native code for extra performance. and can scale smoothly up to much more powerful 32 bit processors.Performance . Even multi-threading and garbage collection have been implemented in a completely system-independent manner.  . the K virtual machine has a highly portable architecture that reduces system dependencies to a minimum. enabling speedy porting to any host platform.

 .  The Connected Device Configuration (CDC) includes the CVM and basic class libraries to support Java language applications on consumer electronic and embedded devices. but with a smaller footprint.CDC : Connected Device Configuration  CVM is a Java 2 virtual machine designed for devices needing the functionality of the Java 2 virtual machine feature set.

and interactive. digital television set-top boxes. personal digital assistants (PDAs). Typically.0MB of total memory. CDC is designed for the devices such as smart communicators.  . pagers. these devices run a 32-bit microprocessor/controller and have more than 2.



 Unsupported Features:  › Dynamic Class Loading › Security Manager › Garbage Collection & Finalization › Threads › Cloning .JCVM has least VM features defined in JVM SPEC.

double. Unsupported Keywords: › native › synchronized › transient › volatile  Unsupported Types: › char. long › Arrays that is more than one dimension. . float.

but none of the rest are. Instead.  .framework.JCSystem.lang package are supported. it supplies a class javacard.  Class java. which provides an interface to system behavior.  Some classes from java.In general.lang. none of Java core API classes are supported in the Java Card platform.System is not supported.

Sign up to vote on this title
UsefulNot useful