Package demos.opengl
Class CheckLinkConsistency
java.lang.Object
demos.opengl.CheckLinkConsistency
WARN : not verified after bumping to JDK 22
----------------------------
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 -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-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheck(SymbolLookup lookup, String function) static Class[]getClasses(String packageName) static voidstatic voidprintLinkStatus(SymbolLookup lookup, Class clazz, Field field, String generatedMethod, demos.opengl.CheckLinkConsistency.Link linkStatus) static voidprintLinkStatus(SymbolLookup lookup, Class clazz, String nativeFunctionPatternFilter, demos.opengl.CheckLinkConsistency.Link linkStatus) static voidprintLinkStatus(SymbolLookup lookup, String packageName, String classPattern, String nativeFunctionPatternFilter, demos.opengl.CheckLinkConsistency.Link linkStatus)
-
Constructor Details
-
CheckLinkConsistency
public CheckLinkConsistency()
-
-
Method Details
-
main
public static void main(String[] args) throws IOException, ClassNotFoundException, IllegalAccessException -
printLinkStatus
public static void printLinkStatus(SymbolLookup lookup, String packageName, String classPattern, String nativeFunctionPatternFilter, demos.opengl.CheckLinkConsistency.Link linkStatus) throws ClassNotFoundException, IOException, IllegalAccessException -
printLinkStatus
public static void printLinkStatus(SymbolLookup lookup, Class clazz, String nativeFunctionPatternFilter, demos.opengl.CheckLinkConsistency.Link linkStatus) throws IllegalAccessException - Throws:
IllegalAccessException
-
printLinkStatus
public static void printLinkStatus(SymbolLookup lookup, Class clazz, Field field, String generatedMethod, demos.opengl.CheckLinkConsistency.Link linkStatus) throws IllegalAccessException - Throws:
IllegalAccessException
-
check
-
getClasses
- Throws:
ClassNotFoundExceptionIOException
-