• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set JVM arg in Tomcat7-Windows?  RSS feed

 
Russy Bond
Greenhorn
Posts: 12
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Tomcat7.0.53 on Windows7. I want to add this JVM arg "-XX:-UseSplitVerifier" in Tomcat but am not sure how to do it on Windows.
Had it been Linux, I would have added it in setenv.sh as
JAVA_OPTS="${JAVA_OPTS} -XX:-UseSplitVerifier"

I have no clue how to do the same on Windows for this specific Tomcat version. Any help on this regard will be highly appreciated.

Thanks,
Russy
 
Tim Holloway
Bartender
Posts: 18552
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Windows equivalent for setenv.sh is setenv.bat

Although the syntax is slightly different, since it's Windows:



JAVA_OPTS is initially blank, however, so the substitution would only be meaningful if you're using several lines to build up the options.
 
Russy Bond
Greenhorn
Posts: 12
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim for your response. I realised that I had downloaded "32-bit/64-bit Windows Service Installer" which did not have the setenv file. I later downloaded "64-bit Windows zip" and added the mentioned JVM arg in the setenv file there and it worked.
Thanks again.
 
Tim Holloway
Bartender
Posts: 18552
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, the stock generic Tomcat does not have setenv.bat or setenv.sh included. But the catalina.sh/bat scripts look to see if you created one and use it if you did.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!