Question

I am new to Scala/Java/Play Framework.

I followed the instructions at http://www.playframework.com/documentation/2.0/Installing to install Java 8 (along with Netbeans) and play framework for OSX.

I created a new Scala Application using "play new myappname" and all the template files have been created.

When I try to run the application using the command "play" from inside the project directory I see the following error:

error: error while loading AnnotatedElement, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
(bad constant pool tag 18 at byte 76)
[error] Type error in expression
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? i
[warn] Ignoring load failure: no project loaded.
[error] Not a valid command: play (similar: last, alias, loadp)
[error] play
[error]     ^

How can I resolve this?

Was it helpful?

Solution

I fixed this by uninstalling JDK 8 and installing JDK 6 from the Apple Developer site at http://support.apple.com/kb/DL1572?viewlocale=en_US

(Side note: First I tried JDK 7 which failed with a similar yet different error).

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top