Like a monkey, Monkey "swings" through the component trees in a particular JavaTM Virtual Machine and presents the hierarchy in two different ways. The first is the actual Component hierarchy and the second is the hierarchy viewed as Accessible objects. In addition, if the user clicks the right mouse button over a tree node in Monkey, Monkey will present the user with a popup menu containing options for manipulating the object.
The Monkey class is in the examples/Monkey directory included with this release of the Java Accessibility Utilities (click here to view the source). The compiled classes of Monkey are also included in the jaccess-examples.jar file includes with this release. Before you can run Monkey, you need to set up your environment appropriately by following these instructions:
After you follow these instructions, you should be ready to run Monkey. If you did not set up your CLASSPATH correctly you might get one of the following errors when running a JavaTM application:
Add the jaccess.jar and jaccess-examples.jar files to your CLASSPATH environment variable. Modify your $JDKHOME/lib/awt.properties file to include the following lines:AWT.EventQueueClass=com.sun.java.accessibility.util.EventQueueMonitor AWT.assistive_technologies=Monkey
Failed loading com.sun.java.accessibility.util.EventQueueMonitor: java.lang.ClassNotFoundException: com.sun.java.accessibility.util.EventQueueMonitor
Error trying to newInstance Monkey java.lang.ClassNotFoundException: MonkeyThe first error means the jaccess.jar file is not in your CLASSPATH, and the second means the jaccess-examples.jar file is not in your CLASSPATH.
The Monkey class is in the examples/Monkey directory included with this release of the Java Accessibility Utilities (click here to view the source). Before you can run it, you need to set up your environment appropriately by following these instructions:
After you follow these instructions, you should be ready to run Monkey.
Copy jaccess.jar and jaccess-examples.jar to the $JDKHOME/jre/lib/ext directory under your JDK1.2 or later installation. Modify (create one if it doesn't exist) your $JDKHOME/jre/lib/accessibility.properties file to include the following line:assistive_technologies=Monkey
Depending upon when it starts, the initial list displayed by Monkey
may not accurately reflect the current state of the Java Virtual Machine.
To update the display, select the "Refresh Trees" item in Monkey's "File"
menu. At any time, you can press the F1 key and Monkey will automatically
refresh the trees as well.