Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8143099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:00:27+00:00 2026-06-06T13:00:27+00:00

I was trying to find out the difference between Apache Tomcat variables – CATALINA_OPTS

  • 0

I was trying to find out the difference between Apache Tomcat variables – CATALINA_OPTS and JAVA_OPTS in SO and surprised to see that there is no question/answer posted here yet. So I thought of sharing it here (with answer) after finding out the difference. Check the answer/difference below.

NOTE: At the time of this posting, we’re running Apache Tomcat v6.0.10 with JDK 6u32 on CentOS5 64-bit arch.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:00:29+00:00Added an answer on June 6, 2026 at 1:00 pm

    There are two environment variables – CATALINA_OPTS and JAVA_OPTS – which are both used in the catalina.sh startup and shutdown script for Tomcat.

    CATALINA_OPTS: Comment inside catalina.sh:

    #   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
    #                   "run" or "debug" command is executed.
    #                   Include here and not in JAVA_OPTS all options, that should
    #                   only be used by Tomcat itself, not by the stop process,
    #                   the version command etc.
    #                   Examples are heap size, GC logging, JMX ports etc.
    

    JAVA_OPTS: Comment inside catalina.sh:

    #   JAVA_OPTS       (Optional) Java runtime options used when any command
    #                   is executed.
    #                   Include here and not in CATALINA_OPTS all options, that
    #                   should be used by Tomcat and also by the stop process,
    #                   the version command etc.
    #                   Most options should go into CATALINA_OPTS.
    

    So why are there two different variables? And what’s the difference?

    1. Firstly, anything specified in EITHER variable is passed, identically, to the command that starts up Tomcat – the start or run command – but only values set in JAVA_OPTS are passed to the stop command. That probably doesn’t make any difference to how Tomcat runs in practice as it only effects the END of a run, not the start.

    2. The second difference is more subtle. Other applications may also use JAVA_OPTS, but only Tomcat will use CATALINA_OPTS. So if you’re setting environment variables for use only by Tomcat, you’ll be best advised to use CATALINA_OPTS, whereas if you’re setting environment variables to be used by other java applications as well, such as by JBoss, you should put your settings in JAVA_OPTS.

    Source: CATALINA_OPTS v JAVA_OPTS – What is the difference?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to find out what the difference is between the IS
I'm trying to find out the difference between using one colon : and two
I'm trying to find out the difference between a thread and a handler. Does
I am trying to find out about the performance difference between normal multithreading and
I'm trying to find out if there's a Wikipedia API (I think it is
What I'm trying to find out is whether there is some sort of equivalence
I am trying to understand what the difference is between string.find and string.match in
I am trying to find the difference between the following two sets: A =
I am trying to calculate the difference between given two times and i find
I am trying to find out the differences between style hidden block none I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.