From: www.itworld.com

Welcome to Java Developer

by Rinaldo S. DiGiorgio

October 19, 2001 —

 

Java is the new language developed by Sun
Microsystems that significantly raises the level of technology on the
Web. Java allows individuals, Web designers, and organizations large
and small to build highly interactive and safe applications. The
technology is based on

Running some Java applets will demonstrate the above features. For
those of you with a mathematical or financial background run the derivative calculator applet
at http://zeitgeist.com. For those of you with a consumer preference,
there is the multimedia application at http://www.vectorman.com. (If you do not have HotJava and you click
on the link, your browser should just ignore the applet.)
For those of you using HotJava you have just downloaded a
program that can be run on your system. This same program runs on
Solaris for SPARC, Solaris for Intel, Windows 95, and NT without
modification.

HotJava Alpha 3 is the current release of the browser. Until now,
releases contained a browser and interpreter, with its corresponding
API. The JDK (Java Development Kit) is the next iteration of the API.
The JDK does not contain a browser but does contain an
appletviewer, which allows you to view applets for debugging
and development, and deployments that use no HTML other than a tag to
call an applet. More
information on obtaining the JDK
is available.

Alpha 3 applets do not work with the JDK or Netscape. Small
modifications are required. The procedure for converting an Alpha 3
applet is described in Converting Alpha 3
applets (http://java.sun.com/JDK-prebeta1/converting/). The HTML interface language was changed slightly,
requiring some minor edits to applets. To get an Alpha 3
applet working with the JDK and Netscape you need to convert the applet
and modify the HTML file that calls the applet.

At the time of this writing a new Netscape version of a browser that
supports Java Applets was not released. To avoid confusion, we will
discuss Netscape's Java abilities in the next issue and focus on
HotJava this month.

Let the games begin

The HotJava browser reads standard HTML just like any other Web
browser. It also has the ability to download Java applets. To
accomplish this, a small addition was made to HTML. An additional tag
was added (<APPLET>) that allows the specification of a Java applet class to be
loaded. When a user clicks on an application that requires an applet, the HotJava browser calls a thread that loads the
applet from the network or local filesystem. The code that is loaded is
the architecture-neutral bytecodes produced by the Java compiler. These
bytecodes are verified and then decoded into machine instructions. It
is hoped future versions will compile these bytecodes to native machine
instructions for improved performance.

Many languages share some of the features of Java. The Java designers
built a practical language for distributed computation without the
complexity associated with such languages. Why another language? It
can be argued that there are systems with enough ubiquity (consider
the proliferation of DOS/Windows 3.x) that there is no need for
Java's benefits. Many years ago, Japan launched a project
called TRON. The purpose of this project was to provide one OS and one
hardware platform for the entire country of Japan. This project
ultimately failed. Java, unlike TRON, is based on standards, proven
network infrastructure, and is architecture independent at runtime.

The salient features of the Java Language are:

Security -- downloading code over the Internet can be safe

There are several layers to the Java security model. These layers
build on each other to provide built-in security that can be extended
and or modified.

Late-breaking news

While this article was being written the beta API was released. This
API is referred to as the JDK -- Java development Kit. The JDK offers
many new improvements and new functionality. Two of our favorite
additions are the Java Debugger and the Java Applet Viewer. The imaging
model has also been changed significantly and offers an excellent
graphics foundation that understands various color models as well as
the performance issues with loading images over slow lines. We'll
discuss these and other parts of the JDK in future columns. In the
mean time, additional information on several topics is available
below:

Uses for Java

Java will play a key role in defining the infrastructure of the
emerging electronic world. We can actually think of several hundred
uses for Java. Here are some of the more common:

Future columns

In future columns we will discuss:

Next month, we discuss Netscape 2.0, including example applets
demonstrating the use of various methods.