Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in Play on Get: java.lang.UnsupportedClassVersionError: controllers/routes : Unsupported major.minor >version

I recently installed Java 1.6 and play 2.10.0. When attempting to run a skeleton web app on the play framework I receive this error upon a page request.

play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.UnsupportedClassVersionError: controllers/routes : Unsupported major.minor version 51.0]]

I've read the play framework threads regarding the unsupported major.minor errors and took action based on what I could understand. After downloading and installing java version 1.6 (I had been using 1.7) my environment looks like the following and I am still receiving the same error. How do I move beyond this error?

java  1.6.0_33

javac 1.6.0_45

Play 2.1.2 (Using Java 1.6.0_33 and Scala 2.10.0)

Path:

C:\Program Files (x86)\Silverfrost\FTN95;C:\Program Files (x86)\Silverfrost\FTN95\FTN95 for Microsoft Visual >Studio;C:\Users\zach\nodejs;C:\Users\zach\AppData\Roaming\npm;C:\Users\zach\NodeApps;C:\Users\zach\Downloads\play-2.1.2\play-2.1.2;C:\Program Files\Java\jdk1.6.0_45\bin;

The error I receive is as follows ...

Exception...

2013-07-12 00:53:00,472 - [INFO] - from play in play-internal-execution-context-1 
Application started (Dev)

2013-07-12 00:53:00,781 - [ERROR] - from application in play-internal-execution-context-3 


! @6f0e5c888 - Internal server error, for (GET) [/] ->

play.api.Application$$anon$1: Execution exception[[RuntimeException: java.lang.UnsupportedClassVersionError: controllers/routes : Unsupported major.minor version 51.0]]
    at play.api.Application$class.handleError(Application.scala:289) ~[play_2.10.jar:2.1.2]
    at play.api.DefaultApplication.handleError(Application.scala:383) [play_2.10.jar:2.1.2]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$18$$anonfun$apply$18.apply(PlayDefaultUpstreamHandler.scala:310) [play_2.10.jar:2.1.2]
    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$18$$anonfun$apply$18.apply(PlayDefaultUpstreamHandler.scala:308) [play_2.10.jar:2.1.2]
like image 701
mccainz Avatar asked Mar 24 '23 05:03

mccainz


1 Answers

I failed to recompile my Play/Scala app under the JDK1.6 environment which I had backed down to, from JDK 1.7. Down-versioning to JDK1.6 and blowing away / recreating my Play/Scala project in JDK 1.6 environment solved the errors.

like image 146
mccainz Avatar answered Apr 12 '23 23:04

mccainz