title: security issue in connecting to a database in using jdbc
body: <p>I have created a java application which connects with the sql database using jdbc. Its a swing application. The code to connect to the database is in one of the files of the project. The username and password to the sql server is hardcoded in there.</p>
  
  <p>I want a solution for this so that I connect to the server(one of the computers on the network having the database ) without directly writing the password in the application, rather it should read from some file on the server.How to do it ?</p>
  
  <p>Again, a security problem comes here that i will have to provide the file name in the application. Since a jar file can easily be decompiled to obtain the source code, anyone can see the name of the file and access it.</p>
  
  <p>How to solve this security issue ?</p>