This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
IMO, the 1st one is better. The 2nd one ties you to a specific type of file system, and requires an absolute path. If your server location change, that code may not work anymore. In addition, because it uses the normal Java IO, it can open any file in your server - to me, it's a security risk.