permaculture playing cards*
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
Author

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
Cardwell
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Check out the methods in the java.io.File class


JavaBeginnersFaq
"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: http://aspose.com/file-tools
 
subject: Getting the users directory path
 
Similar Threads
Given: ...
Referencing classes
How can a program point to a a different directory
struts validation example
Why am I getting a Null Pointer Exception???