JAVA

by Guowei Huang

Java is a powerful language that has exhibited its success by turning static Web pages into interactive, dynamic, animated documents bolstered by distributed, platform-independent applications. Since its debut, it has taken the market by storm and filled the World Wed Web browers almost everywhere with animation, audio, and real-time interactivity.

In this presentatioin we will provide some interesting facts about Java's development, introduce the basic and main features of the language, and give an overview of JavaOS -- a small and efficient operating environment developed by JavaSoft that executes Java applications dirctly on hard ware platforms without requiring a host operating system.

  1. Background
  2. What is Java
  3. Java's predefined classes
  4. Java Evaluation
  5. JavaOS
  6. Summary

[PREV][NEXT][UP][HOME][VT CS]


1. Background

[PREV][NEXT][UP][HOME][VT CS]


2. What is Java?

[PREV][NEXT][UP][HOME][VT CS]


3. Java's predefined class

    The default Java environment currently consists of several different Java packages implementing a diverse set of fundamental classes. They include the following:

  1. java.lang
  2. The java.lang package contains the basic java classes and native types: Class, Object, Boolean, Float, Double, Integer, String, and so on plus those dealing with the extended capabilities of the language and connection with the rest of the system environment.

  3. java.awt
  4. The java.awt package is the abstract Windowing Toolkit which allows you to deal with GUI objects in a generic manner without regard to the system on which your program in running. The classes of this package may be roughly divided into three categories:

  1. java.applet
  2. The java.applet package contains the Applet class, which is the superclass of all applets.

  1. java.io
  2. The java.io package contains classes to support reading and writing streams, files, and pipes. These classes form a fairly structured hierarchy -- most of them are subclasses of InputStream or OutputStream.

  3. java.net
  4. The java.net package contains class to support network programming. These include dealing with sockets, Internet addresses, network datagrams, uniform resource locators (URLs), and content handlers for data from a URL.

  1. java.util
  2. The java.util contains general-purpose utility classes for data structures, such as dictionaries, hashtables, dates, stacks, bits, and strings.

[PREV][NEXT][UP][HOME][VT CS]


4. Java Evaluation

Java has many language features that lead to more robust programs with less coding. These include OOP classes, garbage collection, C syntax, uniform data sizes, boolean and string types, exception handling, final cause, labeled break and continue, strong typing, array boundary checking. The philosophy of using computing power to achieve better program reliability is well-established in Java.

With all the hype around Java, we also hear some discrepancies on what Java has achieved. Here are some issues we would like to discuss.

  • Simplicity and easiness.
  • Certain aspects of Java are easier to learn than C++, but the difficulties most people have in learning to program in both C++ and Java have little to do with the language itself. Instead, that have to do with fundamental object-oriented concepts. Java is somewhat easier than C or C++ not because its syntax is any simpler, but more because there are fewer surprises.

  • Portability
  • Java source code is more portable than C-based languages. Java avoids the major source of porting problems by defining the size of basic types for all implementations.

    (Some people points out the while storage requirements for float and double are defined by Java, precision during calculation is not. This means that that a program that uses floating point arithmetic can produce different answers on different systems, with the degree of difference increasing with the number of calculations a particular value goes through.)

    Java is more portable than other languages in its object code. The trade off is in performance.

  • Issue of cross-platform application
  • Due to its portable byte code, the same Java applet will run anywhere the Java Virtual Machine runs. But Java doesn't solve all the problems of cross-platform development. 

  • Suitability for building large applications
  • Theoretically Java may be perfectly suitable for big project. But we should also consider the following factor:

    The larger of a applications, the more severe these factors will affect the performance.

  • Performance
  • For a lot of reasons, Java is likely to always be slower than C++ and Fortran for typical application. Some of these reasons are:

    With the growing popularity, the issue of performance is becoming more and more important. We hope that with the coming of JavaOS -- a new operating environment, there will be a huge improvement in performance for Java applications.

    [PREV][NEXT][UP][HOME][VT CS]


    5. JavaOS

    JavaOS is a small and efficient operating environment developed by JavaSoft that allowsJava applications to run directly on hardware platforms without requiring a host operating system. The goal of JavaOS is to enable the development of secure, high performance, and highly robust intelligent and dynamic network devices built on multiple hardware platforms in heterogeneous, distributed networks. JavaOS is currently targeted at systems such as intranet terminals for enterprise desktops, consumer Internet computers suitable for Web surfing, and embedded devices where hardware resources are even more restricted. For example, devices have only 1 or 2 MB of RAM and 1 or 2MB of ROM, set-top boxes, PDA's and even electronic devices without any graphical display. One of the best ways of reducing a device's hardware requirements is to remove the overhead caused by requiring a host operating system.

  • Java with a Host Operating System
  • Java without a Host Operating System
  • In order to meet the goal of providing Java Platform without a host operating system, we had to perform the following tasks:

    Figure 2 shows a high-level view of the JavaOS architecture.

  • Is JavaOS an Operating System
  • JavaOS differs from conventional operating systems in several ways: it does not need a file system, does not need virtual memory, does not need separate address spaces, does not support more than one programming language, and does not have its own set of system calls calls.

    JavaOS resembles an operating system in several ways: it is bootable, supports a password-protected login feature, safely runs several applets at a time, includes several device drivers, communicates using many standard network protocols, has its own window system, has an API--the Java API, and will run the thousands of applets and applications that have been written.

  • Performance
  • Advantage of JavaOS
  • The following advantages of using JavaOS are claimed in JavaSoft's white paper about JavaOS.

    [PREV][NEXT][UP][HOME][VT CS]


    6. Summary

    The Java programming language and environment is designed to solve a number of problems in modern programming practice. It has many interesting features that make it an incredibly powerful language. Since its debut, it has taken the market by storm. Surrounded by all the hype about Java it may be advisable to watch rather than to predict how Java's strength and weakness will affect its future. So far, Java is doing unbelievably good in terms of market and development of its environment. We already have Java JDBC, Java WorkShop, Java Beans. Now we have JavaOS, Java Electronic Commerce Framework (JECF), Microsoft Visual J++. Performance will be a big issue as Java grows and great improvement can be expected. But it is still too early to tell Java's future. Let us watch.

    [PREV][NEXT][UP][HOME][VT CS]