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.
I am running a java web application as unix user USER1. The application connects to a database whose DB username and password is stored in a file(say xyz) which is readable only for unix user USER2 and not USER1. How can I read the username and password from the file whic is accessible only to USER2 while running my application as USER1.