ClassFinder 1.11

Rob Nielsen rob at roblisa dot com
9th September, 2003

ClassFinder is a development tool for Java programming. It is a small webserver, written in java which unifies all the javadoc and source files you have for various packages into one interface and provides searching functionality. It is intended for personal use (running on and accessed from the same machine) but would work just as well in an intranet environment. It is not intended for internet use. It is Open Source software, released under the GPL so it is free to use and the source is included.

If you have any problems or suggestions for ClassFinder, let me know.




ClassFinder looks in the deploy directory for javadocs and source files to display. It can work with Windows Shortcuts files, zips, jars, directory structures and URLs to find the files it needs.

To start with you'll probably want the base Java javadocs. If you haven't already downloaded the .zip file you can get it from Place this file, or a shortcut to it into the deploy directory. If you would prefer not to download, you can create a URL shortcut pointing to (In Windows, open the page in a browser, then drag the icon next to the url onto the deploy directory. On other platforms, just make a file with a .url extension containing the URL).

Next, if you would like to be able to view source code for the java classes, look in the base directory of your Java SDK installation and you should find a file called Copy that file (or a shortcut) into the deploy directory.

You can repeat this with any other javadoc or source packages you have. If the javadoc or source is not zipped up, just make a shortcut to the directory and put that in. If you don't have the source code to a package, you can download JAD, the Java Decompiler and place the executable in the deploy directory. Then just place the jar files for the library in deploy and ClassFinder will decompile them on the fly for you. Note that files do not need to be in a particular format so you can have a single jar containing javadoc, source and class files in different trees and ClassFinder will work out what everything is.


ClassFinder also has a static directory. These are extra files that classfinder treats like a normal web server would. If you have a file like static/test/hello.html then you can access it as http://localhost:8008/test/hello.html. The static directory already contains some files used for searching and stylesheets. You can edit these files to your liking.

A special case is a zip or jar file which will be dynamically expanded into the tree. For example, if you have a zip file in the static/test directory and that zip file contains a file one/two/hello.html then you can access it as http://localhost:8008/test/one/two/three/hello.html. Another special case is when a URL shortcut is found (the same format as in the deploy directory). In this case, any URLs in the javadocs that start with the URL shortcut will be remapped to the directory that the URL shortcut is placed.

The reason for these special cases is to allow users to redirect external links in javadocs to a local copy. Two standard examples for the base javadocs are the Java Tutorial and The Java Language Spec. To set these up, download the Tutorial from and place the zip (or a shortcut) in the static/tutorial directory. Now make a URL shortcut to in the same directory. Now you should be able to access the tutorial from http://localhost:8008/tutorial/ and when viewing the javadoc for gui classes, the tutorial link should be a local one.

The Language spec works the same way with the download found at and the URL shortcut as

Every 20 seconds ClassFinder will check the deploy and static directories for any new files and load them up. You can check the log file to see it has had any problems with your files. This interval can be changed in the properties file (or removed if you do not plan on adding new packages). If you do disable the automatic update you will have to open the http://localhost:8008/select page and click Update to load new classes.


Now you are ready to use ClassFinder. Open up your browser to the correct page (determined above) and start. The Search Tips link will help you with searches but basically type the first few letters of the class you want and hit enter. If you want java.lang.String, you might type str. The search will come back with the first match in the top section and the other possible matches in a frame at the bottom. In this case, the desired option is second, after java.lang.StrictMath Clicking on java.lang.String in the bottom section will display the String javadoc but will also indicate that java.lang.String is a class you are interested in so now if you want String, all you need to do is search for s and String will come up as first result. These preferences are stored in the favorites.txt file.

The other way of using ClassFinder is the usual javadoc frames way. To use this method go to http://localhost:8008/doc/ and you will be presented with the standard javadoc frames interface, with the exception that all installed javadoc packages will be merged together into a single interface. It also includes another search facility, in the top left frame. To go back to the first method, click on Search at the top of any class page.

ClassFinder merges all the javadocs into one tree regardless of source so the String javadoc will always be found at http://localhost:8008/doc/java/lang/String.html Similarly if source is available, you can find it at http://localhost:8008/src/java/lang/String.html for a syntax highlighted version or http://localhost:8008/src/java/lang/ for a real version. For the real source code link, if the source is not in a zipfile and it is being accessed from the local machine, the link will redirect to a file:// URL so if your browser supports it, the actual source file can be opened in your text editor, rather than a copy.

ClassFinder also supports multiple versions of packages by letting you disable packages or directories in the deploy directory via the http://localhost:8008/select page. Just install both versions and uncheck one as required. If both versions are left checked, one version will be picked arbitarily to be used. You can group packages by placing them in a subdirectory of the deploy directory which can then be disabled as a group.


To stop the server running, just open the page http://localhost:8008/shutdown and the server will stop accepting requests. To use ClassFinder again, you will have to start it as described in the installation section.

Release History