#!/bin/bash
#
module add apps/java/1.6
java -Xmx1024m HelloWorld
I need to set -XmxYm where Y should be the 95% of available memory on the system in Mb.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here is a script that calls Java with the required heap size.
I strongly advise you to use a lower usagePercent, since a Java application uses more memory than the heap size (for eg. for the PermGen).