Setting JVM options

Hi All,

Thank you for any reply on this topic.

I have a problem with JVM on my Virtual hosting where i have 470 megs of ram available in total.

when i type

java -version

in command line, i get

Cannot allocate ...memory

Cannot start the java virtual machine,.... blah blah

just 2 lines, you get the idea.

if i do java -Xmx32m -version

its ALL GOOD and well , writes me all my info about my 1.6.0 jvm

i can even do -Xmx380m

It just eats 460m instead .

The problem is, i have some tools (sun app serv.) that call java and jre related files e.g. keytool that throw same error Cannot start.... blah blah.

Now the question is :

How do i implicitly specify Xmx option for the jvm

so that it would ALWAYS be restricted?

i dont have access to the source that calls all these tools and pass an argument there , cant do that.

Any ideas?

Do you think i can write somehow a shell script , call it java and have arguments there?

How do i do that? since java has many arguments (LOTSSS)

HELP IS VERY APPRECIATED

Thank you

[1150 byte] By [Jevelopera] at [2007-10-3 5:10:52]
# 1
You can use _JAVA_OPTIONS environment variable or put options into '~/.hotspotrc'
igreka at 2007-7-14 23:17:13 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Hi Do you mean $java_options variable?Im using linux.I have used $JAVA_OPTS which is ignored in many casesand $VMARGSalso was ignoredwhere do i put that .hotsc.. file?Thank you kindly
Jevelopera at 2007-7-14 23:17:13 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3
Its all good now Thank you so much
Jevelopera at 2007-7-14 23:17:13 > top of Java-index,Java HotSpot Virtual Machine,Specifications...