JAVA

"Microsoft rules the desktop, but as networking expands its role, Java could turn out to be the DOS of the Internet. I'm excited about Java's ability to run on any computer, using Windows, Mac OS, Unix, or any other operating system." [McNealy, Sun chief]

What is Java?
Besides being an large Indonesian island and a strong cup of coffee I mean.

In this web page we will first look at the beginnings of Java in The Past, before going on to look at exactly what Java is, and what it can do in The Present, before finally looking at what Java may become and it's possible impact on the world of computers in The Future.

THE PAST

Sun MicroSystems The story of Java highlights the sometimes serendipitous nature of technological development in the face of vague and fast-changing markets. The origins of Java go back to 1990, when the World Wide Web was barely heard of in the computer industry The pers onal computer was in its ascendancy, and at Sun Microsystems, the company had missed major opportunities in the desktop market. As the PC use spread across the landscape, the company faced being stranded in a narrowing slice of the computer market. The co mpany needed a new direction.

Thus a group was formed, code-named Green, to produce such a plan. But they only had a vague notion of what they needed to do. The team resolved to bypass Microsoft and the PC market altogether by designing a software system that could run anywhere, even on devices that people did not yet think of as computers. That meant the system had to be compact and simple. The complete opposite of Sun's existing offerings.

Green concluded that existing languages weren't up to the job. C++ wasn't reliable enough for what they had in mind. It was fast, but its interfaces were inconsistent, and programs kept on breaking. However, in consumer electronics, reliability is more im portant than speed. Software interfaces had to be dependable. Green concluded that it needed a new programming language.

The Green team's ambition was to build a device that would work as an interface to cyberspace. Eventually, the Green team came up with a simple to use graphical device, there were no buttons, just a touch sensitive screen. The system was developed using t heir newly designed language, Oak. This was the progenitor of Java.

However, in the meantime, the notion of the information superhighway was making itself known to the public. A company called Time Warner put forward the notion of Interactive TV. The Green team thought this to be their breakthrough, but instead Time Warne r gave the deal to Silicon Graphics to develop the system.

However all was not lost. Their new language, Oak, dealt with a chief concern of distributed computing.

The original use of the Oak language required security and the ability to execute code from untrusted hosts. It turns out these are virtually the same requirements for allowing people to download and run programs from the Web. No other language has the bu ilt-in security of Oak. It encased security, encryption, and authentication procedures into its core so security was essentially invisible to users. Sun finally saw that the Internet could become Oak's redemption. So it immediately set to work adapting Oa k for the Internet.

In January 1995, Oak was renames Java, due to possible copyright violations and then released on an unsuspecting computer world.

THE PRESENT

Java is a software technology. A computer language unlike anything which has come before. It is a language designed for the Internet. Generally it is thought of as a way to make your web-pages look 'cool', by adding counters and sounds and animations and other interesting things like that..

But Java has potential to be so much more. Since any type of computer can be connected to the Internet, Java was designed to run on any type of machine. Therefore a Java application (called an applet) could potentially be requested by any WWW user on any machine, it would then download onto his/her machine and run like any other application. This means that developers need no longer worry about the 'portability' problem of moving code from one machine to another and the consumer need no longer worry wheth er a particular application will run on which ever machine they are using.

Java applications are run though the computer's web-browser. I.E. the applet is downloaded with the browser and run on the machine. These applets may be part of a web-page or standalone applications. HTML has adapted to cope with this with new tags and fe atures to support Java. Microsoft's Explorer and Netscape's Navigator, the two most popular browsers in the world, both support these tags.

Java makes the prospect of downloading software for day-to-day work a feasible idea. First, it produces highly compact code, making download time much shorter. Second, it's object-oriented, making modularization of programs feasible. So while people will indeed not want to download Microsoft Word even with T3 lines, they will perhaps download simple word processors and spreadsheets, and if they need an extra feature, they can simply download an additional small module to get just the thing required. This will mean the web can become not just something to be browsed, looking for information, but a powerful tool, implementing Sun's idea that 'the Network is the computer'.

Java the language is based on C++. Making learning curves for programmers much shorter. Using the Internet to distribute software also makes life much easier for the software developers. They simply distribute both the applications and any upgrades over t he Internet, dramatically reducing shipping costs.

One possible problem with the downloading of software from not necessarily trusted sites is the security issue. What can a Java Applet do to your machine after you've downloaded it? Security on the Net has become a big issue in recent years because of th is Sun Microsystems have invested Java with a number of security features to combat possible misuse of Java applets or Java in general. Java's powerful security mechanisms act at four different levels of the system architecture.

(1) The Java Language
Most other C-like languages have facilities to control access to "objects", but also have ways to forge access to objects, usually by (mis)using pointers. This introduces two fatal security flaws to any system built on these languages. One is that no obj ect can protect itself from outside modification (pointers modifying data in areas they shouldn't) and secondly a language with powerful pointers is more likely to have serious bugs that compromise security.

Java eliminates these threats in one bold strike by eliminating pointers from the language entirely. There are still pointers of a kind, object references but these are carefully controlled to be safe and are unforgeable. There is also array bounds checki ng(to stop going off the end of an array) and all casts are checked for legality before been allowed.

(2) Bytecode verification
The Java runtime getting the lion's share of it's bytecodes(code generated by the Java compiler) from the Net, can never tell whether those by the codes were generated by a "trusted" compiler. Therefore it must verify that they meet all the safety require ments. Verification is done by a piece of code called(surprisingly enough) the Verifier.

The Verifier makes sure that the bytecodes do not forge pointers, violate access restrictions, access objects as other than what they are (Input Streams are always used as Input Streams and never as anything else), call methods with inappropriate argument values or types, nor overflow the stack.

(3) The Class Loader
When a new class is loaded into the system, it is places in one of several different "realms". In the current release there are three, your local computer, the firewall guarded local network on which your computer is allocated and the Internet. Each of th ese is treated differently by the class loader. In particular, the class loader never allows a class from a "less protected" realm to replace a class from a more protected realm. I.E. A class from the Internet realm may not replace a class in the local re alm. Thus no class from outside your computer can take these classes and change Java code into using "nasty" versions of these primitives. In addition classes in one realm cannot call upon the methods of classes in other realms, unless those classes have expli citly declared those methods public. This implies that classes from other than your local computer cannot even see the file system I/O methods, much less call them, unless you or the system wants them to.

(4) The Security Manager
The final level of security is the SecurityManager, an abstract class that was recently added to the Java system to collect, in one place, all the security policy decisions that the system has to make as bytecodes run (the system provides several levels o f default security polices).

An instance of some subclass of SecurityManager is always installed as the current security manager. It has complete control over which of a well-defined set of "dangerous" methods that are allowed to be called by any given class. These include file I/O ( for obvious reasons), methods that create and use network connections both incoming and outgoing and finally methods that allow one thread to access and manipulate another thread.

These four levels of security mean that Java applets cannot in general read and write files on the client file system and from making network connections except to the originating host. In addition applets loaded over the net are prevented from starting t heir programs on the client. Applets are also not allowed to load libraries or to define native method calls. If an applet could define native method calls, that would give the applet direct access to the underlying computer.

Sun MicroSystems have tried to make Java as secure as possible without sacrificing too much functionality, but like any security system as time goes by there will be those who will find the cracks and holes in the armour.

THE FUTURE

Java has been inspired by the proliferation of the WWW, and yet the future of the WWW looks increasingly likely to be defined and encouraged by the increasing use of Java. Many of the current problems and complaints about the web may be solved by increase d use of Java applets. At the same time improvements in the web will necessitate constant improvements and innovations in this newest of programming languages.

We all know how much information is out there on the Web. But there are terabytes more freely available information which is not available on the Web, because the structure is not there to efficiently organize, find and display this information over the c urrent WWW. With the increasing use of Java, the idea of integrating 4GL databases with the Web, using Java applets, is set to change the way we acquire and interpret information. By the middle of 1996, integrating the Internet's World Wide Web with tradi tional client-server database applications will be a very hot topic for mainstream business users, says David Kelly, a senior consultant with Hurwitz Consulting Group (Newton, MA).

One of the keys to increasing Web usage is likely to be the Net Computer or 'Internet Toaster'. These machine will blend the look and feel of familiar computer interfaces with Java-based desktops, offering network computers the chance to look like establi shed machines. The initial profile for this 'toaster' is expected to include a minimum screen of 640 by 480 pixels (VGA resolution on a PC), a pointing device such as a joystick or mouse, a keyboard, a speaker, and audio output jacks. Hard B disks and floppy drives will not be required since the machines can download data and applications each time they connect to the network. The profile also covers Internet protocols, multimedia formats, and security features. The number of small, low-cost devices for connecting to the net is likely to increase significantly with the introduction of Internet and multimedia multimedia chips. The most prominent example is that of Sun Microelectronics. It has proposed a number of different Java chips that will be used in a range of devices.

As Web usage increases it will become more and more important to have efficient and powerful tools, business as well as pleasure, available to the users. The way it looks right now, these tools will be programmed in Java. From word-processors and spreadsh eets, to Doom and Street fighter, Java could potentially be the catalyst which finally ends the 'compatibility' wars. If Sun MicroSystems dream is realized all the computers, in the world will be linked as one giant machine, exchanging information and app lications, with the WWW and Java supplying the operating system for this machine.


If you wish to find out more about Java and it's uses, why not try the
JavaSoft web site.
Return to Project Title Page