title: Set environment variable values in persistence.xml from Eclipse
body: <p>I'm using OpenShift, and I'm trying to deploy my application to a local Tomcat instance for faster development. I'm using EclipseLink for DB transactions, and I've provided the environment variables OpenShift uses in persistence.xml like this:</p>
  
  <pre><code>&lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/&gt; 
  &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://${env.OPENSHIFT_MYSQL_DB_HOST}:${env.OPENSHIFT_MYSQL_DB_PORT}/mydbname"/&gt; 
  &lt;property name="javax.persistence.jdbc.user" value="${env.OPENSHIFT_MYSQL_DB_USERNAME}"/&gt; 
  &lt;property name="javax.persistence.jdbc.password" value="${env.OPENSHIFT_MYSQL_DB_PASSWORD}"/&gt;
  </code></pre>
  
  <p>I'm using linux on my local machine, so I've set all of these variable values to the local versions as well (localhost, 3306, etc). I've double checked that they are available in terminal. I've also tried providing them like described <a href="https://stackoverflow.com/questions/2844807/environment-variable-expansion-in-persistence-xml-jpa">here</a> - I've opened the Tomcat instance's settings in Eclipse, chose "Open launch configuration", and on the Arguments tab, I've typed them into VM arguments (also tried the "Variables..." menu). However, it's not working, and I'm getting NumberFormatException on the PORT variable, I guess it takes the raw string "${env.OPENSHIFT_MYSQL_DB_PORT}" as port.</p>
  
  <p>(Apparently, it's not working on OpenShift either.)</p>
  
  <p>Where can I set these variable values in Eclipse/Tomcat to make it work?</p>
  
  <p>Thank you in advance!</p>