File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 9043
    
  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
Why am I getting a Null Pointer Exception???
Referencing classes
Given: ...
struts validation example
How can a program point to a a different directory