HotJava vs. Java

Java applets are only as useful as the Web browsers that support them.

Although Netscape Navigator is certainly a strong contender for the Java support crown, Sun has its own browser that is specifically designed with Java in mind: HotJava.

The HotJava Web browser builds on the techniques established by NCSA Mosaic and Netscape Navigator, while adding the capability to add new behaviors dynamically. The tight link to the Java language is what enables HotJava to have this dynamic behavior.

This Is HotJava

For now, it's important to understand why HotJava is significant as a Web browser.

There are a variety of technical innovations in HotJava that promise to make it more extensible than other Web browsers.

These innovations stem largely from the fact that HotJava is designed around supporting the Java language.

The primary innovation that sets HotJava apart from other browsers is its extensibility. Where other browsers have most or all of their components hardwired to the executable browser application, HotJava opts for a more distributed approach. This means that by itself, HotJava doesn't really support any object types or Internet protocols. But its extensible design provides a very open path to add support without modifying the HotJava application itself.

Furthermore, HotJava can be extended to provide new support automatically and on demand without the user even having to know.

Following is a list of the major features in HotJava:

  • Dynamic Object Types
  • Dynamic Protocols
  • Network Security

Dynamic Object Types

Along with dynamic content within Web pages, HotJava also aims to be dynamic on a few other fronts. One of these fronts is the support for dynamic object types. An object type refers basically to a file format, such as the popular GIF (Graphics Interchange Format) graphics files.

Although most Web browsers provide support for the most popular object types right now, who's to say what new object types will appear in the future? Obviously no one knows what object types will become popular in the future. For this reason, HotJava takes an open-ended approach to supporting object types. HotJava is capable of dynamically linking to Java code for handling a particular object type on the fly.

Rather than Sun having to create a new version of HotJava each time a new object type appears on the scene, HotJava can instead locate an object handler and deal with it dynamically. Incidentally, object handlers are also known as content handlers.

You may be wondering where the object handlers come from, and how HotJava knows about them to begin with. Typically, the vendor that creates an object will also create a handler routine for interpreting the object.

As long as the handler is present on a server with the objects in question, HotJava can link to the code and automatically upgrade itself to support the new object type.

While other Web browser developers are busily hacking in patches to support new object types, HotJava users will be automatically and transparently upgrading each time they encounter a new object type. How HotJava and conventional Web browsers differ in their handling of objects.

Dynamic Protocols

Similar to its dynamic support for new object types, HotJava also takes a dynamic approach to handling new Internet protocols. The most important components of the Internet are the protocols used for each medium of communication, such as HTTP or FTP.

Think back to the days before the HTTP protocol and you'll realize what I mean! As with objects, there is no way to foresee what new Internet protocols will spring up in the future.

The best way to handle this unknown is to anticipate a certain flux in protocol growth and write applications that can adapt to change. Sun did exactly this by designing HotJava so that it could dynamically link in support for new protocols.

You are probably familiar with Internet URLs, which define the location of Internet resources. An example URL follows:

This URL is for Sun's Java home page. As you can see, the protocol type for this URL is specified at the beginning of the URL name. In this case, the protocol type is specified as http, which stands for hypertext transfer protocol.

Most Web browsers have built-in functionality to handle protocols such as HTTP. HotJava, on the other hand, looks externally to handle different protocols.

When HotJava encounters a URL, it uses the protocol name to determine which protocol handler to use to find a document. Like a handler for an object, a protocol handler is a separate piece of code that defines how to interpret information from a particular protocol.

Network Security

When you start thinking about interactive content and what it means to the broad base of users it will affect, there is an unavoidable issue of security. To get an idea of how important the issue of security is, think back to how things were before the Web.

Prior to the Web, online services, independent bulletin boards, and private networks served as the primary electronic communication mediums. Most of these mediums were and still are completely based on static content. Even so, the instances of viruses and other security-related problems have always been in relative abundance.

In most of these cases, users would knowingly transfer a file to their computer that was assumed to be safe. The file would end up doing harm to their machine once it was transferred. Obviously, the users wouldn't have transferred the file if they had known about the virus beforehand.

The point is that even with users having complete control over which files are transferred, viruses have still flourished.

Now consider the possibilities for security breaches with interactive content in the global Internet environment. Given that users are able to interact with Web pages in an interactive environment, the software must be able to respond dynamically. You've probably guessed that this creates a potentially dangerous situation.

This brings us to the next key issue in the design of HotJava: security.

In HotJava, you can specify security options relating to what access you want to allow incoming executable content to have to your machine. You can specify whether and how much you want to allow applets to be able to read, write, or change files on your machine. You can set up security regions in HotJava by creating firewalls.

A firewall is typically a set of computers within a certain domain name. Usually these computers are assumed to be safe, so they are listed as being located behind the firewall. You'll learn more about configuring firewalls later in this page.

The top noch technical support for wide range of java web hosting solutions is available at

Java and HotJava

The majority of the features implemented in HotJava stem from the fact that HotJava is designed around supporting Java. Before getting into more specifics regarding HotJava, it is important to clarify the relationship between Java and HotJava.

To recap prior chapters, Java is an object-oriented programming language derived in many ways from C++. Java enables you to write programs and applets that can be embedded in Web pages and executed interactively. HotJava is a Web browser written in Java that implements object and protocol handlers as external libraries.

HotJava is akin to Netscape Navigator or NCSA Mosaic, with the primary difference being that it is written in the Java language and is far more extensible.

Java Versions

The Java language and HotJava browser are both very new technologies that are still in the developmental stages. The first released version of the Java language was known as the alpha release.

A decent number of programs were written under the alpha release and are still around. However, Sun later released a beta version of Java with some major changes to the programming interface.

This resulted in a rift between programs written using the alpha release of Java and programs written using the beta release. Add to this confusion the release of a final version of Java.

With the release of the beta version of Java, Sun declared the Java API frozen, meaning that none of the existing classes would be modified in the final release. However, this didn't restrict Sun from adding new classes and methods to Java; it just meant they couldn't change the old ones.

This results in backward compatibility between the final and beta versions of Java; all beta programs should compile and run fine under the final release of Java.

The remaining problem then is what to do about the alpha programs still in existence? Most developers have already ported or begun porting their alpha programs to the beta, and now, final releases.

All new Java development should be focused on the final release.

HotJava's Support for Java

But there's always a catch! The problem right now is that Sun has focused its efforts on polishing Java, and has kind of dropped the ball on bringing HotJava up to date. What this means is that the alpha release of HotJava, which is the latest, only supports alpha Java applets.

You can't program to the final Java API and incorporate the applets into the current version of HotJava. Hopefully, by the time you read this Sun will be closer to releasing a beta or even final version of HotJava, but it's still too early to guess.

So, you may be wondering how to deal with this problem? Do you go ahead and write outdated alpha code so you can use HotJava, or do you blindly write final code and pray that a new version of HotJava that will run the final code will be released soon? The answer is neither. In light of this problem, Sun released an applet viewer program that supports the final release of Java.

Additionally, Netscape Navigator 2.0 is supposed to fully support the Java final release. HotJava is an important technology, and all release delays aside, it will still be an important application for Web users and Java programmers in the future.

Furthermore, because it is itself written in Java, it will be without a doubt the most Java-compatible browser around. In the meantime, you can still have a lot of fun with HotJava by running the many alpha Java programs that are available.

Contact sales!