Play Framework 2.3 Java:指定配置文件时出现 FileNotFoundException

Play Framework 2.3 Java : FileNotFoundException when specifying configuration file

这很简单:我正在尝试在我的服务器上启动我的 Play 应用程序。在 ./activator clean compile stage 之后,我使用以下命令(在应用程序目录中):

./activator "start -Dconfig.file=/srv/play-apps/prudentia/conf/prod.conf -Dhttp.port=9035"

此异常失败:

Configuration error: Configuration error["/srv/play-apps/prudentia/conf/prod.conf" : java.io.FileNotFoundException: "/srv/play-apps/prudentia/conf/prod.conf"  (Aucun fichier ou dossier de ce type)]

文件存在,777权限也抛出异常...

好的,我启动应用程序的方式是错误的:我必须使用 stage 命令创建的二进制文件:

target/universal/stage/bin/prudentia -Dconfig.file=/srv/play-apps/prudentia/conf/prod.conf -Dhttp.port=9035

这很好用。