How to pass the -D additional parameter while starting tomcat?

batch-file, environment, java, parameters, tomcat6

Solution

You can set an environment variable to do that. E.g. in Linux:

export JAVA_OPTS="-Dapp.username -Dapp.username"

Or in Windows:

set JAVA_OPTS="-Dapp.username -Dapp.username"

Do this before starting Tomcat

Problem

I have a maven project, after running command mvn install all project as well as module compile and copied to local repository successfully. But now I want to run the generated web application in tomcat6. Client provided some parameter for tomcat like `-Dapp.username,-Dapp.username,` which will be used internally once project will start.ButI do not know how to set these additional parameter in tomcat6. Below is my development environment - OS = Windows - Tomcat = tomcat 6.0.27 Please help me?

Original source

Related problems