Free Encyclopedia of Ecommerce :: Free Encyclopedia of Ecommerce :: Java - HOW JAVA WORKS
 

Java - How Java Works

HOW JAVA WORKS

Because it is an interpreted language, Java doesn't work alone. It relies on an interpreter called the Java Virtual Machine (JVM) to function. Many high-level programming languages, like C and C++, rely on programs called compilers or interpreters so they can be converted to the fundamental machine language (zeroes and ones) that a computer's hardware actually understands. However, instead of being translated directly into machine language, programs written in Java are compiled into bytecode—an intermediate language that can be interpreted by any computer running JVM. This is what gives the Java language the ability to run on any computer. While the Java programming language is available for free to programmers, the JVM requires a license for use.

Besides JVM, the Java language relies on another critical component known as the Java Platform. As David Flanagan explained in Java in a Nutshell, the Java platform consists of a set of classes. "A class is a module of Java code that defines a data structure and a set of methods (also called procedures, functions, or subroutines) that operate on that data." Classes are subsequently organized into groups called packages, which involve many functions, including networking, graphics, input/output, user-interface creation, and security.

When programs written in Java run from a Web page, they are referred to as applets. When they run on servers, they are referred to as servlets. Rather than running from a server, Web page applets actually get downloaded to a user's computer, sometimes in a matter of seconds. This frees up the server's resources so its efficiency is not affected. Many applets are available to Web site operators for free. Examples of applets include productivity tools like spread sheets, animation, mathematical applications like calculators, Web forms, and more. Many applets can be valuable tools on e-commerce sites. Because they are actual programs, applets allow Web site operators to expand the capabilities of their sites beyond that which is possible with hypertext markup language (HTML)—the authoring or presentation language used for creating the appearance of Web pages.

Like most programming languages, Java has evolved since it first came onto the scene. Since the mid-1990s, several improved versions have been released. Although other languages like Visual Basic were easier to learn, there was a very strong interest in Java during the early 2000s. At that time, hundreds of books had been written on the language, and it was poised to play an increasing role on the World Wide Web. Some industry professionals expected Java to become the dominant programming language of the 2000s.

FURTHER READING:

Appleman, Daniel. How Computer Programming Works. Berkeley: Apress. 2000.

Bull, Glen and Gina Bull "Java Applets." Learning and Leading with Technology, May, 2000.

Flanagan, David. Java in a Nutshell. Sebastopol, California: O'Reilly & Associates, Inc. 1999.

"Java." NetLingo Inc, January 31, 2001. Available from www.netlingo.com.

"Java." Techencyclopedia, March 7, 2001. Available from www.techweb.com/encyclopedia.

"The Origins of C and C++." Cyberdiem, January 30, 2001. Available from www.cyberdiem.com.

Tash, Jeff. "Java! Java! Java!" Planet IT, May 4, 1999. Available from www.planetit.com.

SEE ALSO: C; Programming Language; HTML

User Comments Add a comment…