ajhager / libgdx-sbt-project.g8

A g8 template for developing Scala games using libgdx.
85 stars 44 forks source link

Add Java 8 Support #89

Closed darkfrog26 closed 10 years ago

darkfrog26 commented 10 years ago

[error] java.io.IOException: Can't read [/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar](Can't process class [com/oracle/net/Sdp$1.class] %28Unsupported class version number [52.0] %28maximum 51.0, Java 1.7%29%29) [error] at proguard.InputReader.readInput(InputReader.java:232) [error] at proguard.InputReader.readInput(InputReader.java:202) [error] at proguard.InputReader.readInput(InputReader.java:180) [error] at proguard.InputReader.execute(InputReader.java:100) [error] at proguard.ProGuard.readInput(ProGuard.java:196) [error] at proguard.ProGuard.execute(ProGuard.java:78) [error] at proguard.ProGuard.main(ProGuard.java:483) [error] Caused by: java.io.IOException: Can't process class [com/oracle/net/Sdp$1.class](Unsupported class version number [52.0] %28maximum 51.0, Java 1.7%29) [error] at proguard.io.ClassReader.read(ClassReader.java:112) [error] at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87) [error] at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87) [error] at proguard.io.JarReader.read(JarReader.java:65) [error] at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65) [error] at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53) [error] at proguard.InputReader.readInput(InputReader.java:228) [error] ... 6 more [error] Caused by: java.lang.UnsupportedOperationException: Unsupported class version number [52.0](maximum 51.0, Java 1.7) [error] at proguard.classfile.util.ClassUtil.checkVersionNumbers(ClassUtil.java:140) [error] at proguard.classfile.io.LibraryClassReader.visitLibraryClass(LibraryClassReader.java:89) [error] at proguard.classfile.LibraryClass.accept(LibraryClass.java:301) [error] at proguard.io.ClassReader.read(ClassReader.java:86) [error] ... 12 more

aginiewicz commented 10 years ago

Well, Java 8 is out of scope for Android (AFAIK at least for some time), so personally I don't plan to update my machine yet (as Android is my main target platform).

What you would have to do to make desktop version of this template work, is switching proguard to 5.0 (which was released less than month ago and is supposed to add java 8 support) in here: https://github.com/ajhager/libgdx-sbt-project.g8/blob/master/src/main/g8/project/build.scala#L48

I believe this is most you have to do to have java 8 on desktop working, but I wouldn't count for other platforms to be there anytime soon - unless something changed recently and Android is now accepting java 8 classes (it doesn't even has invoke dynamics from java 7 yet)

ajhager commented 10 years ago

Closing because this is currently out of scope for this project.