Skip to content

Commit

Permalink
Use Java 8 compatible class lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
ds58 committed Oct 23, 2024
1 parent 1327948 commit b54fbc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion java/org/cef/misc/DataPointer.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public float getFloat(int offset) {
static {
MethodHandles.Lookup lookup = MethodHandles.lookup();
try {
Class<?> clz = lookup.findClass("org.lwjgl.system.MemoryUtil");
Class<?> clz = Class.forName("org.lwjgl.system.MemoryUtil", false, lookup.lookupClass().getClassLoader());
memByteBuffer = lookup.findStatic(clz, "memByteBuffer", MethodType.methodType(ByteBuffer.class, new Class[]{Long.TYPE, Integer.TYPE}));
} catch (Throwable err) {
System.err.println("Could not find LWJGL MemoryUtil's memByteBuffer method.\nAre you using LWJGL 3.x?");
Expand Down

0 comments on commit b54fbc1

Please sign in to comment.