It is possible, for a variety of reasons, that the above applet might not run on your browser. For this reason (or others), you might wish to download the applet and run it as an application. As long as you have the JavaTM SE Runtime Environment (which can be downloaded from the Oracle® Software Downloads page) installed, there are two ways to do this:
java -jar huffman.jarOn some operating systems, you may also be able to run the program by double-clicking the icon for huffman.jar.
The table is initially sorted, first in nonincreasing order of number of occurrences, then in nondecreasing order of length of Huffman code, then in nondecreasing order of Huffman code. Using the Sort menu, the user can choose how the table is sorted. A stable sorting algorithm is used, so that if the table is first sorted by one key then another, the result will have the second key as primary key, and the first key as secondary key.
Font characteristics may be changed using the Font menu.
This message occurs when the runtime environment does not allow the program access to the local file system. The most common cause is pressing the "Choose File" button when the program is run as an applet. Most browsers do not allow applets access to the local file system.
This message occurs when an attempt is made to draw the tree, but the runtime system cannot find the package edu.ksu.cis.viewer. The most probable cause is that the program is run as a stand-alone application without Web Start (see "Manual download" above), but the file viewer.jar has not been downloaded to the same directory as huffman.jar.
This message occurs when any error occurs while the program is interacting with the local file system; for example, the name of a nonexistent file is given. The cause of the error is briefly described in the message.
Rod Howell (firstname.lastname@example.org)
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.