Change Xmx in Java running on windows 2003 server and Apache Tomcat

for the life of me i cannot find how i change the xmx settings to increase the memory

everyone says run java, but i just get a

'java' is not recognized as an internal or external command,
operable program or batch file.

returned.

There is no java in the control panel, i was originally going by [http://www.auditmypc.com/java-memory-xmx512.asp] but it did not seem to work
LVL 5
funnymanmikeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
If your objective is to increase the heap size for Tomcat, you need to edit/set JAVA_OPTS usually
0
funnymanmikeAuthor Commented:
ive seen that link, but i still don't understand what it is i need to do


why are some documents saying i can run a command, and others change this file

where is this file located and is there a guide on changing it?
0
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

CEHJCommented:
You'll find the scripts under the installation directory. Change them with any editor
0
VenabiliCommented:
You need CATALINA_OPTS for Tomcat really (mainly because Tomcat will be the only one using it while if you set JAVA_OPTS, you might have other Java programs getting incluenced. Unless if you use either of them in the start script of the tomcat of course.

As for how to do it - you can either do an environment Variable (if that is the only tomcat running...) or just edit the start script and do the export of the variable there.
0
funnymanmikeAuthor Commented:
catalina_opts? where can i find that

this is the only running tomcat (multiple sites though)

where ever i can edit, is fine by me.

0
CEHJCommented:
JAVA_OPTS only has meaning for Tomcat and is recommended in the Wiki. You can set that as a system variable. How you'd do that depends on your OS. For Windows, Window help under 'environment variables' will tell you
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VenabiliCommented:
Same place you find JAVA_OPS - you either create the environment variable in Windows or you edit the start script to set it.

set CATALINA_OPTS=-Xmx512m

before the starting of the tomcat server should be enough... CEHJ already told you where the scripts that need to be edited live :)
0
funnymanmikeAuthor Commented:
but i don't see a file path, i don't understand. you say cehj told me where the screens that need to be edited, but i see no file path. there is a clear lack of understand on my part.

please don't get me wrong but i simply do not understand. is the filename called CATALINA_OPTS? do i search for this?
0
VenabiliCommented:
>JAVA_OPTS only has meaning for Tomcat and is recommended in the Wiki.

That's CATALINA_OPTS... and that's what recommended on the apache site. JAVA_OPTS is common for all web containers... JBoss for example. They have the same meaning otheriwse... so either can be used.

funnymanmike,

CATALINA_OPTS is an environment variable (in your Windows). You can either set it up there (My Computer -> Properties -> Advanced -> USer Variables) or open the script that you use to start Tomcat and edit it there.
0
funnymanmikeAuthor Commented:
k

i see a windows service, the path is

"D:\Program Files\Aspect Software\Unified IP\TOMCAT\bin\wrapper.exe" -s "D:\Program Files\Aspect Software\Unified IP\TOMCAT\conf\wrapper.conf"

inside wrapper.conf i see

wrapper.java.initmemory=256
wrapper.java.maxmemory=1024

so here is where i would change the maxmemory correct?
0
VenabiliCommented:
OK - that's a bit different from where all this started  - you are not running a clean Tomcat but use the Wrapper:) Both me and CEHJ were explaining to you how to deal with a Tomcat as a server.

Yes - this is where you need to change it and the Wrapper will automatically create the Xmx commands for you and execute them. See http://wrapper.tanukisoftware.org/doc/english/prop-java-maxmemory.html for some mroe explanations.
0
funnymanmikeAuthor Commented:
thank you, sorry that it took so long for me to understand
0
VenabiliCommented:
That's not a problem at all :)

Let me know if you have any issues with this:)
0
funnymanmikeAuthor Commented:
Lack of understanding on my part made this harder. Tech's did a great job.
0
CEHJCommented:
:-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.