I have an existing Play 2.1 project. I've been running it with the console and it works fine. However, when I try to run it with IntelliJ using these instructions it doesn't work:
https://www.jetbrains.com/help/idea/getting-started-with-play-2-x.html#run_debug_playApp
First I tried just running it by right clicking on the app and selecting "run play 2 app". It would not run and it gave me this error:
sbt.IncompatiblePluginsException: Binary incompatibility in plugins detected.
After some research into the issue I added -Djline.terminal=
to my JVM options and tried again. This time it ran, but gave this error when I tried to open a page in the browser:
Global : Unsupported major.minor version 52.0
Finally, I tried reimporting my project into intellij. Before it would import, it forced me to update my SBT version in build.properties from 0.12.2 to 0.12.4. I did this, but still getting the same errors listed above.
NOTE: I have Java 7 set as my JDK.
Here is the full stack trace:
play.api.PlayException: Cannot init the Global object[Global : Unsupported major.minor version 52.0]
at play.api.WithDefaultGlobal$$anonfun$play$api$WithDefaultGlobal$$globalInstance$1.apply(Application.scala:57) ~[play_2.10-2.1.1.jar:2.1.1]
at play.api.WithDefaultGlobal$$anonfun$play$api$WithDefaultGlobal$$globalInstance$1.apply(Application.scala:51) ~[play_2.10-2.1.1.jar:2.1.1]
at play.utils.Threads$.withContextClassLoader(Threads.scala:18) ~[play_2.10-2.1.1.jar:2.1.1]
at play.api.WithDefaultGlobal$class.play$api$WithDefaultGlobal$$globalInstance(Application.scala:50) ~[play_2.10-2.1.1.jar:2.1.1]
at play.api.DefaultApplication.play$api$WithDefaultGlobal$$globalInstance$lzycompute(Application.scala:383) ~[play_2.10-2.1.1.jar:2.1.1]
at play.api.DefaultApplication.play$api$WithDefaultGlobal$$globalInstance(Application.scala:383) ~[play_2.10-2.1.1.jar:2.1.1]
Caused by: java.lang.UnsupportedClassVersionError: Global : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_80]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[na:1.7.0_80]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_80]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) ~[na:1.7.0_80]
at java.net.URLClassLoader.access$100(URLClassLoader.java:71) ~[na:1.7.0_80]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.7.0_80]