« The Last Minute of 2005 to Have 61 Seconds | Main | Cruise the World with the Google Maps API »
December 06, 2005
A Simple JSP to View Everything in Your Classpath
TSIA:
<!-- This page prints the classpath URL's under the current System
classloader. -->
<%
ClassLoader sysClassLoader = ClassLoader.getSystemClassLoader();
java.net.URL[] urls = ((java.net.URLClassLoader)sysClassLoader)
.getURLs();
for(int i=0; i < urls.length; i++)
{
out.println(urls[i].getFile() + "<BR>");
}
%>
Sample Output:
/C:/JRun4/servers/lib/
/C:/JRun4/servers/lib/pbclient42RE.jar
/C:/JRun4/servers/lib/pbserver42RE.jar
/C:/JRun4/servers/lib/pointbase-service.jar
/C:/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib/cfusion.jar
/C:/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib/
/C:/JRun4/servers/cfusion/cfusion-ear/cfusion-war/WEB-INF/cfusion/lib/bcel.jar
etc...
Code modified from A Java Geek's Diary.
Posted by Chuck at December 6, 2005 04:11 PM
Trackback Pings
TrackBack URL for this entry:
http://www.chuckcaplan.com/blog/mt-tb.cgi/33
Comments
I think this was by far the best posting ever. You are clearly a genius. You're also really sexy in those Simpsons PJ's:-). I LOVE YOU!!!
Posted by: Steph at December 6, 2005 09:51 PM