Skip to content

Commit

Permalink
fixing java command line options for 'go' MaxPermSize -> MetaspaceSiz…
Browse files Browse the repository at this point in the history
…e in java 8
  • Loading branch information
lukeis committed Sep 24, 2015
1 parent 423df21 commit d345587
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
unset GEM_HOME
unset GEM_PATH

JAVA_OPTS="-client"
JAVA_OPTS="-client -Xmx2048m -XX:ReservedCodeCacheSize=256m"

java $JAVA_OPTS -Xmx2048m -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=256m -jar third_party/jruby/jruby-complete.jar -X-C -S rake $*
java_version=`java -version 2>&1 | sed 's/java version "1\.\(.*\)\..*"/\1/; 1q'`

if [[ "$java_version" > 7 ]]
then
JAVA_OPTS="$JAVA_OPTS -XX:MetaspaceSize=1024m"
else
JAVA_OPTS="$JAVA_OPTS -XX:MaxPermSize=1024m"
fi

java $JAVA_OPTS -jar third_party/jruby/jruby-complete.jar -X-C -S rake $*

0 comments on commit d345587

Please sign in to comment.