2015-01-22 9 views
12

Ottengo un "java.lang.OutOfMemoryError: Java heap space" quando si esegue l'attivatore. Vorrei impostare l'heap a dimensioni illimitate. Ho letto da qualche altra cosa che ho bisogno di cambiare SBT_OPTS o _JAVA_OPTION in qualche modo simile a questo:Come impostare la dimensione dell'heap in riproduzione/attivatore?

export SBT_OPTS="-Xmx2G -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2G -Xss2M -Duser.timezone=GMT" 

non ho potuto trovare alcuna documentazione su questo ovunque.

+2

Non so se è possibile impostare la memoria illimitata, ma si può facilmente impostare l'utilizzo memorie con 'attivatore -mem 2048 ...' – crak

risposta

16

tl; dractivator -help

È possibile utilizzare JAVA_OPTS (possono interessare altri programmi Java), SBT_OPTS (colpisce anche SBT), ACTIVATOR_OPTS (riguarda solo attivatore) e c'è anche una bandiera -mem è possibile utilizzare.

Penso che anche -J-Xmx512M funzionerebbe.

➜ ~ activator -help 
Usage: activator <command> [options] 

    Command: 
    ui     Start the Activator UI 
    new [name] [template-id] Create a new project with [name] using template [template-id] 
    list-templates  Print all available template names 
    -h | -help   Print this message 

    Options: 
    -v | -verbose  Make this runner chattier 
    -d | -debug  Set sbt log level to debug 
    -mem <integer>  Set memory options (default: , which is -Xms1024m -Xmx1024m -XX:MetaspaceSize=64m -XX:MaxMetaspaceSize=256m) 
    -jvm-debug <port> Turn on JVM debugging, open at the given port. 

    # java version (default: java from PATH, currently java version "1.8.0_25") 
    -java-home <path> Alternate JAVA_HOME 

    # jvm options and output control 
    -Dkey=val   Pass -Dkey=val directly to the java runtime 
    -J-X    Pass option -X directly to the java runtime 
        (-J is stripped) 

    # environment variables (read from context) 
    JAVA_OPTS   Environment variable, if unset uses "" 
    SBT_OPTS   Environment variable, if unset uses "" 
    ACTIVATOR_OPTS  Environment variable, if unset uses "" 

In the case of duplicated or conflicting options, the order above 
shows precedence: environment variables lowest, command line options highest. 
+2

Versione 1.3.2 di attivatore sulle finestre sta ignorando '-help' e Opzioni '-J' (' help' senza dash funziona), anche 'JAVA_OPTS' sono silenziosamente ignorate :(. – monnef

Problemi correlati