【问题标题】:Play framework 2: Error when trying to start application in production mode播放框架 2:尝试在生产模式下启动应用程序时出错
【发布时间】:2013-04-09 05:02:18
【问题描述】:

操作系统:Windows 7 64 位

java 版本:1.7.0_17

javac 版本:1.7.0_17

我是 Play Framework 的新手,基本上想了解一下所有内容。

有一个名为 java/helloworld 的示例应用程序。没有改变任何东西并继续使用“开始”命令。

[helloworld] $ start

(Starting server. Type Ctrl+D to exit logs, the server will remain in background
)

Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at java.lang.System.initializeSystemClass(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range:
 0
        at java.lang.String.charAt(Unknown Source)
        at java.io.Win32FileSystem.<init>(Unknown Source)
        at java.io.WinNTFileSystem.<init>(Unknown Source)
        at java.io.FileSystem.getFileSystem(Native Method)
        at java.io.File.<clinit>(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at java.lang.System.initializeSystemClass(Unknown Source)

【问题讨论】:

    标签: frameworks playframework-2.0


    【解决方案1】:

    我认为这与 Play 无关。您似乎遇到了this issue,这看起来是您的 Windows 风格的 JVM 错误。

    要在生产模式下运行示例应用程序,您可能需要执行以下操作:

    1. 运行play stage 命令(在 Play 控制台之外,就在命令行上)。阶段任务描述here
    2. this JVM argument 添加到阶段任务生成的target\start 脚本中,然后再启动应用程序。

    【讨论】:

      【解决方案2】:

      作为一种解决方法添加

       -Dfile.separator=\/
      

      play.bat 和 build.bat 的参数。

      【讨论】:

        猜你喜欢
        • 2018-03-25
        • 1970-01-01
        • 2012-11-23
        • 2014-10-19
        • 1970-01-01
        • 2023-03-22
        • 2012-06-24
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多