【问题标题】:Play framework showing error as flows while running my newly created application在运行我新创建的应用程序时播放框架显示错误为流
【发布时间】:2015-10-05 12:04:36
【问题描述】:

运行我新创建的应用程序时,Play 框架将错误显示为流。这是我的 shell 步骤和错误堆栈。

C:\play-2.0>play new mysample
       _            _
 _ __ | | __ _ _  _| |
| '_ \| |/ _' | || |_|
|  __/|_|\____|\__ (_)
|_|            |__/

play! 2.0, http://www.playframework.org

The new application will be created in C:\play-2.0\mysample

What is the application name?
> mysample

Which template do you want to use for this new application?

  1 - Create a simple Scala application
  2 - Create a simple Java application
  3 - Create an empty project

> 2

OK, application mysample is created.

Have fun!


C:\play-2.0>cd mysample

C:\play-2.0\mysample>play
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; sup
port was removed in 8.0
error: error while loading AnnotatedElement, class file 'C:\Program Files\Java\j
re1.8.0_31\lib\rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
(bad constant pool tag 15 at byte 2682)
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

【问题讨论】:

    标签: playframework


    【解决方案1】:

    尝试使用 2.4.3 版本的 Play。 Play 2.0 可能使用旧的 Scala 版本,例如 2.9.x。那个 Scala 版本在 JDK 8 中会产生这个错误。

    您需要 Scala 2.10.3+ 才能在 JDK 8 上运行。

    【讨论】:

      猜你喜欢
      • 2021-10-22
      • 2013-01-25
      • 2012-05-09
      • 1970-01-01
      • 1970-01-01
      • 2017-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多