File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes How to set JVM arg in Tomcat7-Windows? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to set JVM arg in Tomcat7-Windows?" Watch "How to set JVM arg in Tomcat7-Windows?" New topic
Author

How to set JVM arg in Tomcat7-Windows?

Russy Bond
Greenhorn

Joined: May 09, 2014
Posts: 10
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16137
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Russy Bond
Greenhorn

Joined: May 09, 2014
Posts: 10
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16137
    
  21

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set JVM arg in Tomcat7-Windows?