|
Java
Applets & |
PAGE (1 of 7) |

![]()
Java is a programming language developed by Sun Microsystems, Inc.
In their words, Java is
|
a simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high-performance, multithreaded, and dynamic language. |
Because Java code is architecture neutral, (aka "platform/operating system independent"), Java applications are ideal for the diverse environment of the Internet.
Java is a descendent of C and C++, using object-oriented programming concepts, such as objects, classes, inheritance polymorphism and object heirarchy.
Java programs fall into two categories: 1. Applets and 2. Applications.
Applets are Internet programs, designed to communicate across the Net and execute within, (i.e. under control of), a Web browser. Java applications are basically the same as traditional programs executing locally on a non-networked, stand-alone, machine.
Due to the possibility of viruses and other malicious behavior, applets are limited in the types of actions that they can perform by executing within a restricted environment. For example, a few of the limitations placed on applets forbide them to read, write or delete files on a user's hard drive. However, Java applications essentially have the same execution privileges as other 'local' programs.
Java applets and applications are translated into Java bytecode, which is a processor independent assembly language-like code. The Java bytecode, (sometimes referred to as J-code), is executed by the Java Virtual Machine interpreter. It is the Java bytecode that makes Java programs 'architecturally neutral'. Interpreted programs typically execute slower than machine code, (processor dependent) programs. Because of this speed disadvantage some Java compilers allow the option of producing specific processor machine code for Java applications, (the same as C/C++ compilers). However, such Java applications while they do not require the Java Virtual Machine to be executed, they are no longer platform independent and must be re-compiled in order to port the program to a different type of system.
These pages do not cover object-oriented concepts. For an introduction to object-oriented programming take CS2704. The following pages discuss how to incorporate existing Java applets and Javascript into Web sites.
|
© CS Dept Va Tech, 1997-1998. |
All rights reserved. |