Skip to content

j4rs v0.25 not compatible with class file v52 #166

Description

@jonpas

j4rs v0.24 works perfectly, but v0.25.0 and higher when used with Java 8 (JDK 1.8) results in:

DEBUG: Invoking static method run of class com.apollo.persistence.Handler using 1 arguments
Exception in thread "Thread-0" java.lang.UnsupportedClassVersionError: org/astonbitecode/j4rs/api/instantiation/NativeInstantiationImpl has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

thread 'main' (410045) panicked at src/lib.rs:65:10:
called `Result::unwrap()` on an `Err` value: JavaError("An Exception was thrown by Java while creating global ref... Please check the logs or the console.")

Looks like some dependency is causing use of class version 55, while Java 8 supports only class version 52. This is related to #54.

I understand if there is no wish to support file version 52 anymore, but in case there is, I decided to open this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions