getDocument base ... without using an applet...?

Anyone know how to get the URL object of just the path of the class I'm in? I can get the path + class name but how do i get the URL obj without the classname included...?
[179 byte] By [FortisVenalitera] at [2007-10-2 9:11:08]
# 1
Why not simply strip out the class name? How are you obtaining the URL? Is the URL in string form? Is it a URL object? The java.net.URL class has methods that can help you retrieve the information you want.
paternostroa at 2007-7-16 23:18:09 > top of Java-index,Java Essentials,New To Java...
# 2

Yeah, I saw that, but all of those methods return the whole string. Path and filename. I've also tried manually stripping out the classname with strings but that didnt work either. What I really need is just a method or some source code that dodoes something along the lines of Applet's getDocumentBase method.

FortisVenalitera at 2007-7-16 23:18:09 > top of Java-index,Java Essentials,New To Java...