Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Soccer League Organizer in Android

Guy Bridge
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Guy Bridge
Android Development Techdegree Graduate 24,991 Points

Forked workspace: getting error on initial compile

I have just downloaded the workspace so I can begin coding, but I get this error when I try to load the players:

Player[] players = Players.load();
System.out.printf("There are currently %d registered players.%n", players.length);

Exception in thread "main" java.lang.UnsupportedClassVersionError: LeagueManager : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

2 Answers

Guy Bridge
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Guy Bridge
Android Development Techdegree Graduate 24,991 Points

Managed to find the issue - it wasn't to do with the code at all, of course : )

My Ubuntu install had OpenJDK on it and also the JDK that I DL'd from Java.

Doing a;

which java - shows Java at /usr/bin/java

but javac was in /opt/jdk/bin - so different versions I guess

sym linking /usr/bin/java to the one in /opt fixed the issue.