Announcement Announcement Module
Collapse
No announcement yet.
tcServer startup parameters in STS 2.8.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • tcServer startup parameters in STS 2.8.1

    Hi,

    I'm trying to launch a (Spring Batch Admin -enabled) webapp in STS, and I need to pass a startup parameter. (According to http://static.springsource.org/sprin...g-started.html I need -DENVIRONMENT=something)

    How do I pass Tomcat a startup parameter if I deploy/run from within STS?

    If I run Tomcat on the command line, I would usually put a custom startup parameter CATALINA_OPTS in CATALINA_{HOME|BASE}/bin/setenv.sh

    I put some debug "touch /tmp/somerrandomtext" or echo statements in all the catalina.sh and setenv.sh I could find in the vfabric folder, with no side effects, and this tells me that STS runs Tomcat in some other way.

    (jinfo on my processes also don't show the new parameter)

    Please advise,

    Thanks,
    Juan
    Last edited by opyate; Dec 6th, 2011, 04:14 AM.

  • #2
    This is NOT a duplicate of http://forum.springsource.org/showth...erver-JVM-args

    I'm especially interested in overriding CATALINA_OPTS, because my variable seems be ignored when following the steps above.
    Last edited by opyate; Dec 5th, 2011, 12:21 PM.

    Comment


    • #3
      STS launches Tomcat with the parameters specified in the launch configuration. It does not evaluate the regular startup files for setting JVM or command line parameters.

      As Christian pointed out in the other blog post: From the Servers view, double click on the Server to open the Server Editor. In the Server Editor click "Open Launch Configuration" in the left column. This brings up the configuration dialog. Click on the Arguments tab and enter your JVM arguments.

      Have you tried adding your parameter that way?

      Steffen

      Comment

      Working...
      X