This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes problem setting JAVA_OPTS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "problem setting JAVA_OPTS" Watch "problem setting JAVA_OPTS" New topic

problem setting JAVA_OPTS

vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
Hi. I'm trying to set JAVA_OPTS in catalina.bat as follows:

However when I double click startup.bat a command window opens and shuts immediately???
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13000
You need to execute startup.bat from an open command prompt to see what is happening.

If another window opens and closes immediately you should change the last executable line of startup.bat from


so that catalina.bat will run in the same window and thus show the real error.

vik ar
Ranch Hand

Joined: Jul 31, 2009
Posts: 104
ok thanks bill. after doing what you said I am getting:

Please note when I do not add JAVA_OPTS tomcat starts up fine.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17026

Try replacing all the backslashes in your directory paths with "real" (forward) slashes. Backslash in Unix/Java is an escape character, so it's usually safer (and more conventient) to code filepaths in Unix form even when running Windows.

Customer surveys are for companies who didn't pay proper attention to begin with.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: problem setting JAVA_OPTS
It's not a secret anymore!