简体   繁体   中英

Unable to set JVM arguments for Playframework binary?

I used activator stage to generate a binary for an playframework (2.3.9) app (the app's name is hello ).

Then I tried to tune JVM arguments to start it like this:

 ./target/universal/stage/bin/hello -Dhttp.port=7878 -Xms900M -Xmx2000m -server

But it returns Bad application path error:

Bad application path: -Xms900M

Does anyone have any ideas about this?

PS The operation system is CentOS. Below is some information :

 del in ~/hello
○ → echo $JAVA_HOME 
/usr/java/jdk1.8.0_45/

 del in ~/hello
○ → echo $CLASSPATH 
/usr/java/jdk1.8.0_45//lib/tools.jar:/usr/java/jdk1.8.0_45//lib/dt.jar

 del in ~/hello
○ → lsb_release -ic    
Distributor ID: CentOS
Codename:   Final

After trying, I found -J- prefix works for JVM args

 del in ~/hello
○ → ./target/universal/stage/bin/hello -Dhttp.port=7878 -J-Xms2000m -J-Xmx2000m

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM