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.
java -versionon your command line.
classfinder.propertiesfile and set the desired server port. The default is set to 8008 but if you are not already running a web server on your machine you could change this to the default http port of 80 which would make it easier to run ClassFinder from your browser.
javaw -jar classfinder.jarFinally you can put classfinder.jar in your classpath and then try
classfinder.logfile, you should be able to see if it has started correctly.
deploydirectory 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 http://java.sun.com/docs. 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 http://java.sun.com/j2se/1.4.2/docs/api/index.html
(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
src.zip. 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.
static/test/hello.htmlthen 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
http://java.sun.com/docs/books/tutorial/ 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 http://java.sun.com/docs/books/jls/second_edition/download/langspec-2.0.html.zip and the URL shortcut as http://java.sun.com/docs/books/jls/second_edition/html
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.
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.Stringin the bottom section will display the String javadoc but will also indicate that
java.lang.Stringis a class you are interested in so now if you want String, all you need to do is search for
sand String will come up as first result. These preferences are stored in the
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/String.java 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.
29/07/03 1.0Initial Release
17/08/03 1.1Added support for selecting packages to use via web interface. Added interval parameter to properties file
09/09/03 1.11Added option to specify proxy details in properties file and fixed problem with shortcuts in JDK 1.4.2