0

I am trying to run tomcat in debuging mode. In the startup I want to add also some system properties, but I could not achieve this. I am running :

    ./catalina.sh jpda run -Dtest.variable="value"

and when I try to access the value of the variable, I get always null:

    System.out.println(null == System.getProperty(test.variable)); //prints always true

Does somebody know any solution for this problem? Thank you!

Mikael Engver
  • 4,634
  • 4
  • 46
  • 53
pokeRex110
  • 833
  • 2
  • 14
  • 26

1 Answers1

2

I have never tried passing system variables to catalina.sh and I don't know if it works. You want to try setting the JAVA_OPTS environment variable in $CATALINA_HOME/bin/setenv.sh

export JAVA_OPTS="-Dtest.variable="value""
The Governor
  • 1,152
  • 1
  • 12
  • 28