0

I need to access a file that isn't relative to the directory that the .jar file is in.

I got lucky with another part of the program doing this, but I really don't know how.

Thanks,
Jack

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by JamesCherrill
0

You can specify a full path from the root (eg c:) to the file, check out the API doc for File. You can also get useful directories like the user's home dir or a temp directory from System.getProperty, eg System.getProperty("user.home") and use that to locate a file.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.