Skip to content

Instantly share code, notes, and snippets.

@potato2003
Last active December 24, 2015 06:59
Show Gist options
  • Save potato2003/6760691 to your computer and use it in GitHub Desktop.
Save potato2003/6760691 to your computer and use it in GitHub Desktop.
Scaladoc で OutOfMemory が出た時の対処 ref: http://qiita.com/potato2003@github/items/f7bed8ef8197fdf2f4c0
$ scaladoc -d doc/ -s src/main/scala/**/*.scala
uncaught exception during compilation: java.lang.OutOfMemoryError
three errors found
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at scala.reflect.internal.util.HashSet.growTable(HashSet.scala:97)
at scala.reflect.internal.util.HashSet.findEntryOrUpdate(HashSet.scala:39)
at scala.reflect.internal.Types$class.unique(Types.scala:3940)
...
$ export JAVA_OPTS="-Xms256m -Xmx1024m"
$ scaladoc -d doc/ -s src/main/scala/**/*.scala
[[ -n "$JAVA_OPTS" ]] || JAVA_OPTS="-Xmx256M -Xms32M"
...
execCommand \
"${JAVACMD:=java}" \
$JAVA_OPTS \
"${java_args[@]}" \
$(classpathArgs) \
-Dscala.home="$SCALA_HOME" \
-Dscala.usejavacp=true \
$EMACS_OPT \
$WINDOWS_OPT \
scala.tools.nsc.ScalaDoc "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment