getting the current directory

simple question - Im building a Swing desktop application, how do i get the current path where my application is executing ? Do I have to use Applet.getDocumentBase() ? Is there another way ?
[219 byte] By [mtndood] at [2007-9-26 2:34:44]
# 1
I think this would beSystem.getProperty ("user.dir");
leukbr at 2007-6-29 9:59:52 > top of Java-index,Archived Forums,Java Programming...
# 2

Thank you! I had tried that earlier and got confused because I was launching the application from my editor (Netbeans) and the output was "C:\netbeans" instead of where the the file actually was.

So here is a tip for others reading this:

If you are trying to read the current path where your class file is esecuting but you are launching your application from an editor, you might not see what you are expecting.

I launched the app from the command line, and I got the correct path :=)

Im one happy newbie.

mtndood at 2007-6-29 9:59:52 > top of Java-index,Archived Forums,Java Programming...