title: Where can I save private key used in java code
body: <p>I'm developing web application on Java, spring, JDBC, which is deployed on Tomcat 7. 
  I'm making encryption/decryption of a data-source password using private key. </p>
  
  <p>Now I have this private key hard coded in Java code. But <strong>I have to save private key in more secured place</strong>. 
  How can I do this?</p>
  
  <p>Is it a good idea to generate certificate (key-store, key-pair), install it on tomcat and retrieve this data from java code? </p>