Saturday, March 20, 2010

Java Technology

The java technology is:

1) Programming Language.

2) Development environment.

3) Application environment.

4) Deployment environment.

The syntax of the Java programming language is similar to C++ syntax You can use the java Programming language to create all kinds of applications that you could by using any conventional programming language.

As a development environment, java technology provides you with a large suite of tool: a compiler, an interpreter, a documentation generator. A class file packaging tool, and so on.

The java programming language is using usually mention in the context of the World Wide Web and browsers that are capable of running programs called applets. Applets are programs written in the Java programming language that reside on web servers, are downloaded by a browser to a client’s system, and are run by that browser. Applets are usually small in size to minimize download time and are invoked by a Hyper Link Markup Language (HTTP) web page.

Java technology applications are standalone programs that do not require a web browser to execute. Typically, they are general-purpose programs that run on any machine where the java runtime environment (JRE) is installed.

There are two main deployment environments. First, the JRE supplied by the Java 2 Software Development Kit (Java 2 SDK) contains the complete set of classes, GUI component classes, am advanced Collection API, and so on. The other main development environment is on your web browser. Most commercial browser supply a Java technology interpreter and runtime environment.

Java Technology Features

1) Java Virtual Machine (JVM) :

An good machine that is implemented by emulating it in software on a real machine. Code for the JVM is stored in .class files, each of which contain code for tat most public class.

The Java Virtual Machine Specification provide the hardware platform specifications to which you compile all java technology code. This specification enables the java software to be platform-independent because the compilation is done for a generic machine, known as the JVM. You can emulate this generic machine in software to run on various existing computer systems or implement it in hardware.

The compiler takes the Java application source code and generates bytecodes. Bytecodes are machine code instructions for the JVM. Every Java technology interpreter, regardless of whether it is a Java technology development tool or a web browser that can run applets, has an implementation of the JVM.

The JVM specification provides concrete definitions for the implementation of the following: an interaction set (equivalent to that of a central processing unit ‘CPU’ a register set, the class file format, a runtime stack, a garbage-collected leap, a memory area, fatal error reporting mechanism, and high-precision timing support.

The code format of the JVM machine consists of compact and efficient bytecodes. Programs represented by JVM bytecodes must maintain proper type discipline. The majority of type checking is done at compile time.

Any complaint Java technology interpreter must be able to run any program with class files that conform to the class file format specified in The Java Virtual Machine Specification.

The JVM design enables the creation of implementation for multiple operating environments.

Garbage Collection

Many programming languages permit the memory to be allocated memory varies based on the syntax of the language, but always returning a pointer to the starting address of a memory block.

After the allocated memory is no longer required (the pointer that references the memory has gone out of extent), the program or runtime environment should de-allocated the memory.

In C, C++, and other languages, you are responsible for de-allocating the memory. This can be a difficult exercise at times, because you do not always known in advance when memory can crash eventually when there is no memory left on the system to allocate. These programs are said to have memory leaks.

The java programming language removes you from the responsibility of de-allocating memory. It provides a system-level thread that tracks that each memory allocating. During idle cycles in the JVM, the garbage collection thread checks for and frees any memory that can be freed.

Garbage collection happens automatically during the lifetime of java technology program, eliminating the need to deallocate memory and avoiding memory leaks. However, garbage collection schemes can vary dramatically across JVM implementation.

1 comment: