Skip to content

Commit

Permalink
Add simple java-run.sh script for Java hello program.
Browse files Browse the repository at this point in the history
  • Loading branch information
jafingerhut committed Apr 5, 2011
1 parent 8a4e931 commit c711e8d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions hello/java-run.sh
@@ -0,0 +1,19 @@
#! /bin/bash

if [ $# -lt 1 ]
then
1>&2 echo "usage: `basename $0` <output-file> [ cmd line args for Java program ]"
exit 1
fi

source ../env.sh

OUTP="$1"
shift

# Use a small limit to avoid using lots of memory. It makes the
# garbage collector collect more often, but the extra CPU time is not
# much.
MAX_HEAP_MB=16

../bin/measureproc ${MP_COMMON_ARGS} ${MP_ARGS_FOR_JVM_RUN} --output "${OUTP}" "${JAVA}" ${JAVA_PROFILING} -server -Xmx${MAX_HEAP_MB}m -classpath ./obj/java hello "$@"

0 comments on commit c711e8d

Please sign in to comment.