Package demos.opengl

Class CheckLinkConsistency

java.lang.Object
demos.opengl.CheckLinkConsistency

public class CheckLinkConsistency extends Object
CheckLinkConsistency relies on preview features of the Java platform:
  • CheckLinkConsistency refers to one or more preview APIs: SymbolLookup.
Programs can only use CheckLinkConsistency when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Allow verifying if all generated MethodHandle of the JExtract'ed libraries can be linked properly to native libraries. Run me with VM args : --enable-native-access=ALL-UNNAMED --add-modules jdk.incubator.foreign -Djava.library.path=.:/usr/lib/x86_64-linux-gnu/ To build this program, you need to change RuntimeHelper to public as well as its lookup method. If you can't, just set it to null To verify that this program works properly, you need to make an explicit load of libraries and ensure that generated code does not do it, as loading class names from the class path will trigger loading. E.g. do this : public class glut_h extends glut_h_6 { static { //System.loadLibrary("GL"); //System.load("/usr/lib/x86_64-linux-gnu/libglut.so.3.9.0"); //System.load("/usr/lib/x86_64-linux-gnu/libGLU.so.1.3.1"); } And then manually load the libraries in the below check program