File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Getting the users directory path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Getting the users directory path" Watch "Getting the users directory path" New topic

Getting the users directory path

cardwell cupp
Ranch Hand

Joined: Aug 16, 2001
Posts: 66
Is it possible to get the directory that the java file is being run from? I am writing some code that has to do with icons(it is not an applet), I don't want to have to hard code the paths.
Thanks all for the help
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
Check out the methods in the class

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link:
subject: Getting the users directory path
It's not a secret anymore!