The remainder of this page describes how to install and use the package on your own platform. The JavaTM SE Runtime Environment (JRE) is required to run the viewer as a stand-alone application, whereas The JavaTM SE Development Kit (JDK), which includes the JRE, is required to use the class library in your own JavaTM programs. Both packages can be downloaded from the Oracle® Software Downloads page.
java -jar viewer.jarPlease note that all letters must be lower-case in the above command. On Windows, the application can also be run by double-clicking on the viewer.jar icon.
To create and manipulate a tree, enter any string in the text field in the upper left-hand corner, and press either the Put button to add that string as a key to the tree, or the Remove button to remove that key from the tree. The keys will be maintained in lexicographic order. The Back and Forward buttons allow you to move through the history of your tree construction. The Clone button opens a new window with an exact copy of the tree and history in your current window; the tree in this window can then be manipulated independently.
Important Note: This applet treats all keys as strings. You may enter numbers, but be aware that they will be treated as strings (e.g., "10" < "5"). Virtually all of the questions I've received regarding this program have reflected a misunderstanding of this fact.
javac -classpath viewer.jar *.java
java -cp .;viewer.jar MyClass.java
(On unix, the ";" is replaced by a ":".)
The complete package documentation can be browsed online.
Rod Howell (rhowell@ksu.edu)
|
|
|
|
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Microsoft, .NET, Windows, and Visual Studio are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.