簡體   English   中英

Play框架2:嘗試在生產模式下啟動應用程序時出錯

[英]Play framework 2: Error when trying to start application in production mode

操作系統: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)

我不認為這與Play有任何關系。 看起來你遇到過這個問題 ,它看起來像是你的Windows風格的JVM錯誤。

要在生產模式下運行示例應用程序,您可能必須按以下步驟操作:

  1. 運行play stage命令(在Play控制台外部,僅在命令行上)。 階段任務在此處描述
  2. 將此JVM參數添加到stage任務生成的target\\start腳本,然后啟動應用程序。

作為解決方法添加

 -Dfile.separator=\/

play.bat和build.bat的參數。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM