Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Oracle-Java Programming Environment and The Java Runtime Environment (JRE)

Uploaded by

soumitrasss
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Oracle-Java Programming Environment and The Java Runtime Environment (JRE)

Uploaded by

soumitrasss
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Java Programming Environment and the Java Runtime Environment (JRE... https://docs.oracle.com/cd/E19455-01/806-3461/6jck06gqd/index.

html

Documentation Home > JDK 1.1 for Solaris Developer's Guide > Chapter 1 Introduction to the Java Programming Environment > Java Programming
Environment and the Java Runtime Environment (JRE)

JDK 1.1 for Solaris Developer's Guide


Previous: Preface Next: Chapter 2 Multithreading

Java Programming Environment and the Java Runtime


Environment (JRE)
This section describes basic information about Java and the JRE.

What is the Java Programming Environment?


Java is a recently developed, concurrent, class-based, object-oriented programming and runtime environment, consisting of:

A programming language

An API specification

A virtual machine specification

Java has the following characteristics:

Object oriented - Java provides the basic object technology of C++ with some enhancements and some deletions.

Architecture neutral - Java source code is compiled into architecture-independent object code. The object code is interpreted by a Java
Virtual Machine (JVM) on the target architecture.

Portable - Java implements additional portability standards. For example, int s are always 32-bit, 2's-complemented integers. User
interfaces are built through an abstract window system that is readily implemented in Solaris and other operating environments.

Distributed - Java contains extensive TCP/IP networking facilities. Library routines support protocols such as HyperText Transfer Protocol
(HTTP) and file transfer protocol (FTP).

Robust - Both the Java compiler and the Java interpreter provide extensive error checking. Java manages all dynamic memory, checks array
bounds, and other exceptions.

Secure - Features of C and C++ that often result in illegal memory accesses are not in the Java language. The interpreter also applies several
tests to the compiled code to check for illegal code. After these tests, the compiled code causes no operand stack over- or underflows,
performs no illegal data conversions, performs only legal object field accesses, and all opcode parameter types are verified as legal.

High performance - Compilation of programs to an architecture independent machine-like language, results in a small efficient interpreter of
Java programs. The Java environment also compiles the Java bytecode into native machine code at runtime.

Multithreaded - Multithreading is built into the Java language. It can improve interactive performance by allowing operations, such as loading
an image, to be performed while continuing to process user actions.

Dynamic - Java does not link invoked modules until runtime.

Simple - Java is similar to C++, but with most of the more complex features of C and C++ removed.

Java does not provide:

Programmer-controlled dynamic memory

Pointer arithmetic

struct

typedef s

1 of 4 22/12/2018, 19:56
Java Programming Environment and the Java Runtime Environment (JRE... https://docs.oracle.com/cd/E19455-01/806-3461/6jck06gqd/index.html

#define

JRE Components
The JRE is the software environment in which programs compiled for a typical JVM implementation can run. The runtime system includes:

Code necessary to run Java programs, dynamically link native methods, manage memory, and handle exceptions

Implementation of the JVM

The following figure shows the JRE and its components, including a typical JVM implementation's various modules and its functional position with
respect to the JRE and class libraries.

Figure 1-1 Typical JVM's Implementation: Functional Relationship to JRE and Class Libraries

JVM
The JVM is an abstract computing machine, having an instruction set that uses memory. Virtual machines are often used to implement a
programming language. The JVM is the cornerstone of the Java programming language. It is responsible for Java's cross-platform portability and
the small size of its compiled code.

The Solaris JVM is used to execute Java applications. The Java compiler, javac , outputs bytecodes and puts them into a .class file. The
JVM then interprets these bytecodes, which can then be executed by any JVM implementation, thus providing Java's cross-platform portability. The
next two figures illustrate the traditional compile-time environment and the new portable Java compile-time environment.

Figure 1-2 Traditional Compile-Time Environment

Figure 1-3 New Portable Java Compile-Time Environment

2 of 4 22/12/2018, 19:56
Java Programming Environment and the Java Runtime Environment (JRE... https://docs.oracle.com/cd/E19455-01/806-3461/6jck06gqd/index.html

Multithreading JVM
The Java programming language requires that multithreading (MT) programs be supported (see Chapter 2, Multithreading). All Java interpreters
provide an MT programming environment. However, many of these interpreters support only uniprocessor multithreading, so Java program threads
are executed one at a time.

The Solaris JVM interpreter takes full advantage of multiprocessor systems by using the intrinsic Solaris multithread facilities. These allow multiple
threads of a single process to be scheduled simultaneously onto multiple CPUs. An MT Java program run under the Solaris JVM will have a
substantial increase in concurrency over the same program run on other platforms.

Sun Just-In-Time (JIT) Compiler


The Sun Java JIT compiler, an integral part of the Solaris JVM, can accelerate execution performance many times over previous levels. Long-
running, compute-intensive programs show the best performance improvement.

JIT Compile Process


When the JIT compiler environment variable is on (the default), the JVM reads the .class file for interpretation and passes it to the JIT compiler.
The JIT compiler then compiles the bytecodes into native code for the platform on which it is running. The next figure illustrates the JIT compile
process.

Figure 1-4 JIT Compile Process

3 of 4 22/12/2018, 19:56
Java Programming Environment and the Java Runtime Environment (JRE... https://docs.oracle.com/cd/E19455-01/806-3461/6jck06gqd/index.html

The following figure shows the functional relationship of the JIT to the Solaris JVM and JRE.

Figure 1-5 Solaris JVM Functional Relationship to the JIT Compiler

Previous: Preface Next: Chapter 2 Multithreading

© 2010, Oracle Corporation and/or its affiliates

4 of 4 22/12/2018, 19:56

You might also like