Question: I have a webProject with a VM Argument called "-Dfolder"

I use that argument on applicationContext like this:

```
<value>file:${FNET_CORE_CONFIG}/conf/${folder}/jdbc.properties</value>

```

In Eclipse, for testing, i use "Run Configuration" to set the value like this:

```
-Dfolder=Dev

```

Now, I want to test my webapp on Apache Tomcat so I need to set/send the folder VM Argument.

How I do that?

I have to use setenv.sh? How?. Can someone give me and example?

Thanks and sorry for my english

Answer: 
Go to $CATALINA\_HOME and edit `setenv.sh` file by adding the parameters with the value. 
If you want to mass multiple parameters, separate them using `space` 

E.g. 

```
cd /opt/tomcat/bin/ 
sudo nano setenv.sh 

```

edit the line 

```
CATALINA_OPTS="${CATALINA_OPTS}" 

```

to 

```
CATALINA_OPTS="${CATALINA_OPTS} -Dparam=value -Dparam2=value2" 

```

restart tomcat: 

```
service tomcat restart

```

you should now be able to see the arguments passed to tomcat when you run:

```
ps aux | grep tomcat

```
Made it work in Windows, by generating a setenv.bat file in the same directory as catalina.bat and startup.bat (as recommended in catalina.bat) 
and put in the contents of the .bat:

```
set CATALINA_OPTS="-DyourVariableName=yourValue"

```

That's all. I liked this way as it looks pretty clean