java - How to set jvm heap size in shell script -


in korn shell script have this.

#!/bin/ksh  . /xxxxxx/classpath.sh export javahome=/usr/java5 export path=$javahome/bin:$path export path export classpath export _java_options="-xmx1g" java ....... 

getting below error. tried java options above. but, still getting same error?? please need this. thanks.

jvmdump006i processing dump event "systhrow", detail "java/lang/outofmemoryerror" - please wait. jvmdump032i jvm requested snap dump using '......trc' in response event 

keep variable jvm_args , prog_args, place vm_args , prog_args @ appropriate positions below

java <jvm_args> com.test.main <prog_args>

example:-

export classpath=${classpath}:${config_dir};  jvm_args="-dprocess.name=mainprocess -xmx1024m -xms256m "  prog_args="/home/saravana/files"  $java_home/bin/java $jvm_args com.test.main $prog_args 

add dependent lib in classpath variable, add jvm_args starting & max heap, process name, add program args in prog_args

jvm_args, prog_args variable names can keep names


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -