File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 13036
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: 17410

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: problem setting JAVA_OPTS
It's not a secret anymore!