Citizendia
Your Ad Here

Java Sun Logo

A Java Virtual Machine (JVM) is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and scripts. In Computer science, a virtual machine (VM is a Software implementation of a machine (computer that executes programs like a real machine "Scripting" redirects here For other uses see Script. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. In Computer science, an intermediate language is the language of an Abstract machine designed to aid in the analysis of Computer programs The term comes Java bytecode is the form of instructions that the Java virtual machine executes This language conceptually represents the instruction set of a stack-oriented, capability architecture. A stack-oriented programming language is one that relies on a Stack machine model for passing parameters Capability-based security is a concept in the design of Secure computing systems

Java Virtual Machines operate on Java bytecode, which is normally (but not necessarily) generated from Java source code; a JVM can also be used to implement programming languages other than Java. For example, Ada source code can be compiled to Java bytecode, which may then be executed by a JVM. Ada is a structured, Statically typed, imperative, and object-oriented high-level computer Programming language JVMs can also be released by other companies besides Sun (the developer of Java) -- JVMs using the "Java" trademark may be developed by other companies as long as they adhere to the JVM specification published by Sun (and related contractual obligations).

The JVM is a crucial component of the Java Platform. Java refers to a number of Computer software products and specifications from Sun Microsystems that together provide a system for developing Application software Because JVMs are available for many hardware and software platforms, Java can be both middleware and a platform in its own right — hence the expression "write once, run anywhere. In Computing, a platform describes some sort of Hardware architecture or Software framework (including Application frameworks, that allows Middleware is computer Software that connects Software components or applications " Write once run anywhere " ( WORA) or sometimes Write once run everywhere (WORE is a slogan created by Sun Microsystems to illustrate the " The use of the same bytecode for all platforms allows Java to be described as "compile once, run anywhere", as opposed to "write once, compile anywhere", which describes cross-platform compiled languages. A compiled language is a Programming language whose implementations are typically Compilers (translators which generate Machine code from The JVM also enables such unique features as Automated Exception Handling which provides 'root-cause' debugging information for every software error (exception) independent of the source code. Automated Exception Handling is a Computing term referring to the computerized handling of errors Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of a condition that changes the normal flow of execution

The JVM is distributed along with a set of standard class libraries which implement the Java API (Application Programming Interface). Java refers to a number of Computer software products and specifications from Sun Microsystems that together provide a system for developing Application software The virtual machine and API have to be consistent with each other and are therefore bundled together as the Java Runtime Environment.


Contents

Execution environment

Programs intended to run on a JVM must be compiled into a standardized portable binary format, which typically comes in the form of .class files. In the Java Programming language, Source files (java files are Compiled into class files which have a. A program may consist of many classes in different files. For easier distribution of large programs, multiple class files may be packaged together in a .jar file (short for Java archive). In Computing, a JAR file (or J ava AR chive is used for aggregating many files into one

The JVM runtime executes . In Computer science, runtime or run time describes the operation of a Computer program, the duration of its execution from beginning to termination class or . jar files, emulating the JVM instruction set by interpreting it, or using a just-in-time compiler (JIT) such as Sun's HotSpot. An emulator duplicates (provides an emulation of the functions of one System using a different system so that the second system behaves like (and appears to An instruction set is a list of all the instructions and all their variations that a processor can execute In Computer science, an interpreter normally means a Computer program that executes, i In Computing, just-in-time compilation ( JIT) also known as dynamic translation, is a technique for improving the runtime performance of a Computer HotSpot is the primary Java Virtual Machine for desktops and servers produced by Sun Microsystems. JIT compiling, not interpreting, is used in most JVMs today to achieve greater speed. Ahead-of-time compilers that enable the developer to precompile class files into native code for a particular platform also exist.

Like most virtual machines, the Java Virtual Machine has a stack-based architecture. In Computer science, a stack machine is a Model of computation in which the computer's memory takes the form of one or more stacks The term also refers

Although the JVM was primarily aimed at running compiled Java programs, other languages can now run on top of it[1], such as:

Bytecode verifier

A basic philosophy of Java is that it is inherently "safe" from the standpoint that no user program can "crash" the host machine or otherwise interfere inappropriately with other operations on the host machine, and that it is possible to protect certain functions and data structures belonging to "trusted" code from access or corruption by "untrusted" code executing within the same JVM. Ruby is a dynamic, reflective, general purpose Object-oriented programming language that combines syntax inspired by Perl with Smalltalk JRuby is a Java implementation of the Ruby interpreter being developed by the JRuby team JavaScript is a Scripting language most often used for Client-side web development Rhino is an Open source JavaScript engine. It is developed entirely in Java and managed by the Mozilla Foundation. Python is a general-purpose High-level programming language. Its design philosophy emphasizes programmer productivity and code readability Jython, successor of JPython, is an implementation of the Python programming language written in Java. Common Lisp, commonly abbreviated CL, is a dialect of the Lisp Programming language, published in ANSI standard document Information Armed Bear Common Lisp is an implementation of Common Lisp that runs on the Java Virtual Machine. Groovy is an object-oriented Programming language for the Java Platform as an alternative to the Java programming language. Scala ( Scalable Language) is a multi-paradigm Programming language designed to integrate features of Object-oriented programming and Furthermore, common programmer errors that often lead to data corruption or unpredictable behavior such as accessing off the end of an array or using an uninitialized pointer are not allowed to occur. Several features of Java combine to provide this safety, including the class model, the garbage-collected heap, and the verifier.

The JVM verifies all bytecode before it is executed. This verification consists primarily of three types of checks:

The first two of these checks take place primarily during the "verification" step which occurs when a class is loaded and made eligible for use. The third is primarily performed dynamically, when data items or methods of a class are first accessed by another class.

The verifier permits only some bytecode sequences in valid programs, e. g. a jump (branch) instruction can only target an instruction within the same function or method. A branch (or jump on some Computer architectures, such as the PDP-8 and Intel x86) is a point in a Computer program where the In Computer science, a subroutine ( function, method, procedure, or subprogram) is a portion of code within a larger Because of this, the fact that JVM is a stack architecture does not imply a speed penalty for emulation on register-based architectures when using a JIT compiler. In the face of the code-verified JVM architecture, it makes no difference to a JIT compiler whether it gets named imaginary registers or imaginary stack positions that need to be allocated to the target architecture's registers. In fact, code verification makes the JVM different from a classic stack architecture whose efficient emulation with a JIT compiler is more complicated and typically carried out by a slower interpreter.

Code verification also ensures that arbitrary bit patterns cannot get used as an address. Memory protection is achieved without the need for a MMU. Memory protection is a way to control memory usage on a computer and is core to virtually every Operating system. A memory management unit ( MMU) sometimes called paged memory management unit ( PMMU) is a Computer hardware component responsible for handling Thus, JVM is an efficient way of getting memory protection on simple architectures that lack an MMU. This is analogous to managed code in Microsoft's .NET CLR, and conceptually similar to capability architectures such as the Plessey 250, and IBM System/38. Managed code is computer program code that executes under the management of a Virtual machine, unlike unmanaged code which is executed directly by the computer's The Common Language Runtime (CLR is the Virtual machine component of Microsoft's. Capability-based security is a concept in the design of Secure computing systems The Plessey 250 was a Computer system manufactured by the Plessey company The System/38 was a Midrange computer Server Platform manufactured and sold by the IBM Corporation

Bytecode instructions

Main article: Java bytecode

The JVM has instructions for the following groups of tasks:

The aim is binary compatibility. Java bytecode is the form of instructions that the Java virtual machine executes In Computer science, an instruction is a single operation of a processor defined by an Instruction set architecture. Arithmetic or arithmetics (from the Greek word αριθμός = number is the oldest and most elementary branch of mathematics used by almost everyone In Computer science, type conversion or typecasting refers to changing an entity of one Data type into another In Computer science, dynamic memory allocation is the allocation of memory storage for use in a Computer program during the Runtime of that program In Computer science, a stack is an Abstract data type and Data structure based on the principle of Last In First Out (LIFO A branch (or jump on some Computer architectures, such as the PDP-8 and Intel x86) is a point in a Computer program where the In Computer science, a subroutine ( function, method, procedure, or subprogram) is a portion of code within a larger Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of a condition that changes the normal flow of execution A monitor is an approach to synchronize two or more computer tasks that use a shared resource usually a hardware device or a set of Variables With monitor-based Each particular host operating system needs its own implementation of the JVM and runtime. An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination These JVMs interpret the byte code semantically the same way, but the actual implementation may be different. More complicated than just the emulation of bytecode is compatible and efficient implementation of the Java core API which has to be mapped to each host operating system. The Java Class Library is a set of dynamically loadable libraries that Java applications can call at Runtime.

Secure execution of remote code

A virtual machine architecture allows very fine-grained control over the actions that code within the machine is permitted to take. This is designed to allow safe execution of untrusted code from remote sources, a model used by Java applets. A Java applet is an Applet delivered in the form of Java bytecode. Applets run within a VM incorporated into a user's browser, executing code downloaded from a remote HTTP server. Hypertext Transfer Protocol ( HTTP) is a Communications protocol for the transfer of information on the Internet. The remote code runs in a restricted "sandbox", which is designed to protect the user from misbehaving or malicious code. This article is about the Computer security mechanism For the Wikipedia feature where newcomers can experiment with editing or established editors can experiment with Publishers can purchase a certificate with which to digitally sign applets as "safe", giving them permission to ask the user to break out of the sandbox and access the local file system and network. A digital signature or digital signature scheme is a type of asymmetric cryptography used to simulate the security properties of a handwritten Signature . .

C to bytecode compilers

From the point of view of a compiler Java bytecode is just another processor with an instruction set for which code can be generated. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another Java bytecode is the form of instructions that the Java virtual machine executes The JVM was originally designed to execute programs written in the Java language. However, the JVM provides an execution environment in the form of a bytecode instruction set and a runtime system that is general enough that it can be used as the target for compilers of other languages. A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer.

Because of its close association with Java the JVM performs the runtime checks mandated by the Java specification. This can make it technically difficult to translate C code (which is much more lax with regard to runtime checking) to the JVM and expect it to run without issuing any warnings. tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured

Compilers targeting many different languages, including Ada and COBOL, have been written. Ada is a structured, Statically typed, imperative, and object-oriented high-level computer Programming language COBOL (ˈkoʊbɒl is one of the oldest programming languages still in active use

Licensing

Starting with J2SE 5. Java Platform Standard Edition or Java SE is a widely used platform for Programming in the Java language 0, changes to the JVM specification have been developed under the Java Community Process as JSR 924[2]. The Java Community Process or JCP, established in 1998, is a formalized process which allows interested parties to be involved in the definition of future versions As of 2006, changes to specification to support changes proposed to the class file format (JSR 202[3]) are being done as a maintenance release of JSR 924. Year 2006 ( MMVI) was a Common year starting on Sunday of the Gregorian calendar. In the Java Programming language, Source files (java files are Compiled into class files which have a. The specification for the JVM is published in book form,[4] known as "blue book". The preface states:

We intend that this specification should sufficiently document the Java Virtual Machine to make possible compatible clean-room implementations. Sun provides tests which verify the proper operation of implementations of the Java Virtual Machine.

Sun's JVM is called HotSpot. HotSpot is the primary Java Virtual Machine for desktops and servers produced by Sun Microsystems. Clean-room Java implementations include Kaffe and IBM J9. Clean room design (also known as the Chinese wall technique is the method of copying a design by Reverse engineering and then recreating it without infringing Kaffe is a Clean room design of a Java Virtual Machine. It comes with a subset of the Java 2 Platform Standard Edition Java API and Tools J9 is a Java Virtual Machine developed by IBM. The J9 VM is the basis of multiple IBM Java offerings including WebSphere Micro Edition, as well as the Sun retains control over the Java trademark, which it uses to certify implementation suites as fully compatible with Sun's specification.

See also

Notes

  1. ^ Tolksdorf, Robert (2005). This article provides non-exhaustive lists of J2SE Java virtual machines (JVMs Automated Exception Handling is a Computing term referring to the computerized handling of errors The Common Language Runtime (CLR is the Virtual machine component of Microsoft's. Parrot is a register -based Virtual machine being developed using the C programming language and intended to run Dynamic languages efficiently Java bytecode is the form of instructions that the Java virtual machine executes In the Java Programming language, Source files (java files are Compiled into class files which have a. Programs written in Java have had a reputation for being slower and requiring more memory than those written in natively compiled languages such as C or C++ (see This page is intended to list all current compilers compiler generators interpreters translators etc Languages for the Java VM. Retrieved on 2008-06-08. 2008 ( MMVIII) is the current year in accordance with the Gregorian calendar, a Leap year that started on Tuesday of the Common Events 68 - The Roman Senate accepts emperor Galba. 536 - St Silverius becomes Pope (probable
  2. ^ JSR 924 – Specifies changes to the JVM specification starting with J2SE 5. 0
  3. ^ JSR 202 – Specifies a number of changes to the class file format
  4. ^ The Java Virtual Machine Specification (the first and second editions are also available online)

References

External links


© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic