Thanks a lot Anand and Peter.. The dollar example from peter was good.
Deployment was successful when i tried the below,
set "JAVA_OPTS=-Xms128M -Xmx512M -XX:MaxPermSize=256M"
As peter pointed out, i have reduced maximum heap size from 800m to 512m. So the operating system has some memory left to do the task..
I had one doubt with -Xss parameter. This parameter should set the size of java stack or and not the size if native method stacks.
So that by setting it to a low value or reducing it will have more memory for native method stack.
From the link,
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
am not able to clearly figure out the default value of UseDefaultStackSize. Am using java 1.6, So if the default stack space 512k then reducing it to 256k will free some space so that the operating system can use it.
But how does this is related to swap space? Am trying to understand what is happening.
Swapping is a process of copying pages from RAM to hard disk, so that the freed space in RAM can be used for other task.
The error is "Out of swap space? ". Out of swap space means that While trying to copy the pages from RAM to Hard disk, there is no space in the Hard disk for swapping the pages.
If so how does setting the -Xss parameter is going to help? Basically reducing the jvm stack size how will it fix the "Out of swap space" issue?