classfind allows mapping between Java class names, packages, and their location in the classpathUses include:
classpath anomalies
import statements, help urls etc. in editors
classpath completion using zsh
classfind is released under the GPL license. Right-click and choose Save As if your browser doesn't offer you the option.
classfind.jar - the .jar file to use
classfind.tar.gz - the source code and scripts
classfind is designed to be invoked from editors, shell completions etc. Consequently you'll want to wrap it in a script, such as:
#!/bin/sh java com.oopsconsultancy.classfind.Main $*
classfind operates by analysing the environment's CLASSPATH, and building a mapping of classes vs. their packages and their location in the CLASSPATH. This mapping is stored in a file called .classfind, located (unless specified otherwise) in your home directory.
classfind options:
example% classfind -c Document /usr/java/j2sdk1.4.0/jre/lib/rt.jar -> org.w3c.dom.Document /usr/java/j2sdk1.4.0/jre/lib/rt.jar -> javax.swing.text.Documenthighlights that you can access a Java
Document object from two packages, both from within the same .jar file.
Other uses for classfind
import statements and generating Javadoc help urls from within editors. vim configurations available on request.
.zshrc
function classpaths {
reply=(`classfind -p $1 $2 2>/dev/null`)
}
compctl -S "" -X "Completing with %n Java class(es)" -K classpaths java jdb ddd sco jquiz
classfind is written and maintained by OOPS Consultancy Ltd.. Enquiries to classfind@oopsconsultancy.com.