This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I found that: File currentDir = new File(""); does return the current directory that the JAR file is executing in. Is this the best practice for doing something like this? I need to know at run time. Thanks
I think that technically, the meaning of "." is system-dependent. I know it means "current directory" on Unix and Windows, don't know about others. (Mac?) I use it often nonetheless, but it's probably better to use System.getProperty("user.dir") instead.