This action might not be possible to undo. Are you sure you want to continue?
(J2EE & J2SE) KVM (J2ME)
› Well-known Java Virtual Machine.
› Addresses on vast small devices. › Reduces some VM features to fit resource-
› Addresses on smart cards. › It has least VM features.
Java virtual machine is a software system that translates and execute java byte code. › 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 . JVM system is an interpreter.
When a java source file is compiled. which is a collection of Byte codes. The memory addressing is implemented and controlled by java virtual machine (JVM). Bytes code are least affected by virus as compared by executable files. a class file is generated. Memory addressing mean where the variables are created. . There is a built-in support for networking. Java has built-in support for exception handling. If the Byte code is affected. It has built-in support for multithreading application development. and methods are stored in memory. objects are stored. These are later changed to native code by JVM. Byte codes are portable. these are recognized by the JVM and not allowed to be executed.
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 allocate memory for static variables. It sets the default value of all static variable. Class loader Sub-System performs its task in a sequential way: It loads a class file . 2. It transforms symbolic reference into direct reference.1. If any one has manipulated the class file. Static variables are treated as class variables. . Method Area It is a logical memory component of JVM. This logical section of memory holds the information about classes and interfaces. because they take memory from method area. It checks the correctness of the class file.
3. For execution. 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. JVM through the use of new operator allocates memory from the heap for an object.Heap When object or array is created. memory is allocated to them from heap. 4. . This purpose is fulfilled by java stack.
Native method stack When a java application invokes a native method. Program counter register It keeps track of the sequence of the program. 6. Execution Engine Generate and executes the java byte code. . 7. that application does not only use java stack but also use the native method stack for the execution of native methods. Pc register holds the address of the instructions to be executed next. It contains an interpreter and Just In Time compiler. The libraries required for the execution of native methods are available to the JVM through Java Native Interface.5.
. JVM can add support to JNI without affecting other parts of virtual machine. 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. JNI never imposes any restriction on JVM.8.
java) Java Compiler Java Byte code (*.class) Java byte code (moves locally or via web) Java Platform Linux Win32/NT Hardware Solaris .Java Source (*.
class ) Operating System Hardware .java) Java Byte codes move locally or through network Java Interpreter Just in Time Compiler Java C ompiler Java Virtual machine Runtime System Java Byte code (.Java compile-time Environment Compile-time Environment Compile-time Environment Class Loader Byte code Verifier Java Class Libraries Java Source (.
which is interpreted by the resident JVM. › code is compiled to byte code. Java is platform independent only for the reason: › Only depends on the Java Virtual Machine (JVM). . › JIT (just in time) compilers attempt to increase speed.
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. 2. Reducing the memory utilized by the virtual machine during execution. Reducing the size of the virtual machine and class libraries themselves. To meet the market need for a very small footprint Java implementation. by allowing pluggable garbage collection).
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. pagers. J2ME is a new edition of the Java 2 platform targeted at consumer electronics and embedded devices. So named because its size is measured in the tens of kilobytes. This typically applies to digital cellular phones. low-end analog set-top boxes. The KVM is the core of the Java 2 Micro Edition (J2ME). and small retail . mainstream personal digital assistants.
Because of the reduced VM size and memory utilization. it requires only a few tens of kilobytes of dynamic memory to run effectively.the K virtual machine is currently only 50-80 K of object code in its standard configuration. depending on target platform and compilation options.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. . Reduced Memory utilization . The results of the careful design and implementation are readily apparent: Reduced VM Size .
and can scale smoothly up to much more powerful 32 bit processors.although implemented in native code for extra performance. . the K virtual machine has a highly portable architecture that reduces system dependencies to a minimum.the K virtual machine is able to run effectively on 16 bit processors clocked as low as 25 MHz. enabling speedy porting to any host platform. Portability . Performance . Even multithreading and garbage collection have been implemented in a completely system-independent manner.
The Connected Device Configuration (CDC) includes the CVM and basic class libraries to support Java language applications on consumer electronic and embedded devices. 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. but with a smaller footprint. .
Typically.0MB of total memory. personal digital assistants (PDAs). these devices run a 32-bit microprocessor/controller and have more than 2. digital television set-top boxes. pagers. . CDC is designed for the devices such as smart communicators. and interactive.
JCVM has least VM features defined in JVM SPEC. Unsupported Features: › Dynamic Class Loading › Security Manager › Garbage Collection & Finalization › Threads › Cloning .
. double. long › Arrays that is more than one dimension. Unsupported Keywords: › native › synchronized › transient › volatile Unsupported Types: › char. float.
. Instead. it supplies a class javacard. Class java.JCSystem.lang package are supported.System is not supported. none of Java core API classes are supported in the Java Card platform. Some classes from java. which provides an interface to system behavior.framework. In general.lang. but none of the rest are.