tags:

views:

1119

answers:

2

Hi,

I'm trying to setup Tomcat6 to work with JMX on Windows Vista 64.

To do that I need to pass the parameters below to Tomcat6.

What I do in command prompt. (that doesn't work)

set CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9898 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
tomcat6.exe

What I do that does work (but causes other problems)

java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9898 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -jar bootstrap.jar

It seems as if tomcat is just ignoring the environment variable CATALINA_OPTS. Am I doing something wrong?

--- Update - Since writing this i've tried to edit catalina.bat and define the variable CATALINA_OPTS there. No success. (tried adding the parameters to JAVA_OPTS too, no success either)

Thanks in Advance!!

A: 

Ignoring the possibility that TC6 could be broken in that environment as I can't check it myself, there are a couple of things you can check:

  • You have two - characters in your CATALINA_OPTS line in the first parameter, should be one. That would break it, I expect.

If not that:

  • Is anything else in your Tomcat startup script overwriting CATALINA_OPTS?
Brabster
Thanks. The double - chars were a typo for the web site.The actual command was run without the typo.
Ben
A: 

Silly me, I started tomcat with tomcat6.exe instead of startup.bat.

Now works. Thanks!

Ben