Portal Home > Knowledgebase > Articles Database > Java: possible to set max. memory globally?


Java: possible to set max. memory globally?




Posted by omega36, 08-18-2008, 07:52 PM
Hi, In some VPS environments there is not enough memory available to run java, and the usual error occurs, ie: # java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. So in the command line we force the maximum memory allowed for java: # java -Xmx128 -version java version "1.5.0_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) Java HotSpot(TM) Server VM (build 1.5.0_14-b03, mixed mode) Now my current problem is that there are some scripts/other applications I am running that don't seem to have a single easy area to declare the max. memory that java can use, so my question obviously is, is there any option or java configuration file where maximum memory available to java can be set globally? I've done a lot of searching and am still unable to find an answer to this. If anyone knows, please post here, or any alternatives - thanks in advance!



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Newspaper going online (Views: 707)
MYSQL in /var or /home (Views: 715)
Legal Threats (Views: 727)
Centrehost (Views: 750)


Language: