我有一个关于playframwork2.6 + sbt + java如何使用sbt的问题。我尝试了两种方法。但失败方法1:在build.sbt中添加java选项
javaOptions += "-Dcom.sun.management.jmxremote=true"
javaOptions += "-Dcom.sun.management.jmxremote.port=9005"
javaOptions += "-Dcom.sun.management.jmxremote.rmi.port=9006"
javaOptions += "-Dcom.sun.management.jmxremote.local.only=false "
javaOptions += "-Dcom.sun.management.jmxremote.ssl=false"
javaOptions += "-Dcom.sun.management.jmxremote.authenticate=false"
javaOptions += "-Djava.rmi.server.hostname=localhost"但是9006和9006不工作方法2:当使用sbt运行项目时,在命令中添加这些参数,如下所示
sbt "-Dcom.sun.management.jmxremote=true"
"-Djava.rmi.server.hostname=localhost" "-Dcom.sun.management.jmxremote.rmi.port=9005" "-Dcom.sun.management.jmxremote.port=9006" "-Dcom.sun.management.jmxremote.ssl=false" "-Dcom.sun.management.jmxremote.authenticate=false" ~run还是不能工作。有人对此有什么期待吗?非常感谢
发布于 2019-11-09 05:08:33
您需要使用bin/activator而不是sbt命令
bin/activator run \ -Dcom.sun.management.jmxremote.port=9005 \ -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun.management.jmxremote.authenticate=false
https://stackoverflow.com/questions/52754310
复制相似问题