在运行我新创建的应用程序时,播放框架将错误显示为流。这是我的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?
答案 0 :(得分:0)
尝试使用2.4.3版Play。 Play 2.0可能使用旧的Scala版本,如2.9.x. Scala版本使用JDK 8生成此错误。
您需要在JDK 8上运行Scala 2.10.3+。