Sun Microsystems

Wake Tech

Your Guide to Java

Introduction
Syllabus
Assignments
Instructors
Samples
Tips
 

Your Guide to Java

Why Java?

In a perfect world, programming languages wouldn't matter to end users. After all, how often do we stop to think about what language was used to create our office suite? In the real world, however, programming languages do matter--they have a profound effect on feature sets, performance, and the costs of hardware and administration.

Java offers a solution to this problem by isolating applications from both hardware and operating systems. Unlike Windows programs, which are almost always compiled for that platform using tools that preclude their running on anything else, Java applications can be designed to run on any system that has a Java Virtual Machine (VM), also known as a Java Runtime Engine. The VM takes Java byte code and transforms it on the fly into instructions that can be executed by the PC. The same byte code can be interpreted as hardware-level instructions for any other platform with a VM implementation.

Java can be used to create two types of programs: applications and applets. Java applications, like those written in other languages, are standalone programs. They require a VM to run, but this runtime environment may be separate, embedded in the OS or in the application itself. By contrast, applets rely on a Web browser with a VM (such as Microsoft Internet Explorer or Netscape Communicator). Since applets are designed to be downloaded, they are also much smaller than applications.

In addition to platform independence, Java applications offer several other advantages. First, Java was designed for network computing and makes hiding the differences between local and remote resources easy. This makes Java an ideal tool for so-called thin-client computing, in which most of the processing and storage is handled by a server, while the client is used largely for display and interaction. Proponents of Java claim that thin clients, also known as network computers (NCs), will reduce the cost of purchasing and maintaining computers.

Second, the Java programming language has a rigorous object-oriented model that makes it possible to build modular applications. An end user need only download a particular feature of a Java word processor when needed, for example. This dynamic design also lets companies create custom desktop environments that display only those applications required by each end user.

Performance remains a problem for Java applications. Since Java is a semi-interpreted language (the VM must interpret the byte code for your machine), Java applications run slower than those compiled into native code for a specific platform.

Finally, despite Java's premise of platform independence, compatibility remains an issue as well. Some applications include their own Java runtime environments and didn't work properly with other environments on different platforms.

To be sure, Java applications aren't without their problems. But the quality and quantity of applications have increased rapidly. Ultimately, the potential of Java outweighs its current problems, and in the coming years, commercial applications written in Java will win a place on many desktops.

Continued...


** PREVIOUS NEXT **