[LWJGL] Java 8 Dependency? Or is it just me?

So I was working on a few GLFW wrapper classes, and I started getting this compile error

The type java.lang.invoke.LambdaMetafactory cannot be resolved. It is indirectly referenced from required .class files

Apparently, this is caused by a missing library that another library is dependant on… I googled it, and LambdaMetafactory is a part of the Java 8 environment… I’ve tried LWJGL-Nightly (#52), LWJGL-Stable, and the LWJGL-3.0.0a libraries… The latter of which used to work before, so is it just me, or does LWJGL have a Java 8 dependency? I’ve recompiled the project and all, to no avail… :frowning:

Thanks in advance.

Should be another library that you are using.
LWJGL 3 is completely Java 1.6 compatible (classfile format version and API) and runs fine with a Java 1.6 JRE.
I could also just build the latest LWJGL 3 sources with JDK1.6.0_45 without any errors.

I was using Log4J, but I haven’t even imported it yet… I used the LWJGL source, still the same error. Using JDK 6, same error…

Which class is reporting the error, then?
Can you post a compile console output?
I assure you that LWJGL 3 sources are completely 100% Java 1.6 compatible.

Building LWJGL3 requires Java 8; the output is Java 6 compatible (for some reason - it may as well be Java 7 at least)

Cas :slight_smile:

That’s untrue. It requires at least 1.6. Just tried. PATH and JAVA_HOME both set to a 1.6 JDK. Works.

Hmm I thought there were some Java8 things being used in the generators but I haven’t really looked deeply.

Cas :slight_smile:

Doesn’t say, just “The type java.lang.invoke.LambdaMetafactory cannot be resolved. It is indirectly referenced from required .class files” on the first line of the effected file.
That is the console output. xD
Well, I tried making a whole new project, trying all the LWJGL versions, downgraded to OpenJDK 6… Nothing.

I can confirm that LWJGL 3 is compatible with Java 6 and up. It also builds fine on Java 6, including the generator.

This is a recent discussion on why LWJGL 3 requires Java 6 (and not 5 or 7).

Thanks for the clarification Spasi.

Cas :slight_smile:

Surely the debugger halts when the class loader attempts to load the incompatible class?

Seems like a trivial issue to track down.

Apparently it was a problem with the classpath configuration, generated a new one with eclipse, worked perfectly… :open_mouth: