Translate

Tuesday, June 14, 2005

Class Viewer Basics

Class Viewer is made to be run from the command line, so you can put the ClassViewer.jar in the classpath, or compile the source and put that in the classpath, and run from the command line with something like:

java com.jstevh.viewer.ClassViewer String

which will open up with the class java.lang.String, or you can just use:

java com.jstevh.viewer.ClassViewer


to open up the GUI that I also call a UEI (User Enabling Interface) blank and type in a class name there.

When not ran as an applet, ClassViewerConfig.xml needs to be in the folder from which you are operating, which means you can have the jar file wherever you want, and different ClassViewerConfig.xml files in folders from which you run the program.

For instance, if you are in /home/research/myresearch and you run Class Viewer from there, you'd need a ClassViewerConfig.xml file in that myresearch folder.

If you run Class Viewer as an applet or directly from the executable jar, you won't be able to select your own classes as they won't be in the classpath.

You can double-click on methods in the left big window to do a search on them, which shows up in the "Results" big window to the right, and then you can double-click on a method there to go to javadocs to that method.

To get inherited methods you have to do a search from the search box in the lower right, and double-clicking on them will just bring you to javadocs at the top of the class.

All searches are case insensitive, and the search from the search box is space delimited.


James

Edited to change packagedirectory.xml to ClassViewerConfig.xml on 7/29/2015, ___JSH

No comments: