Runtime link error - Rendering+Java 1.5.0
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
A DESCRIPTION OF THE PROBLEM : Problem when using native libraries and Swing. Problem happens when native libraries are loaded (System.load), it does not happen when no Swing is used. Example error message:
Runtime link error - it appears that libXt got loaded before libXm, which is not allowed. Exception in thread "main" java.lang.InternalError: libXt loaded before libXm at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1737) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1662) at java.lang.Runtime.loadLibrary0(Runtime.java:817) at java.lang.System.loadLibrary(System.java:986) at vtk.vtkPanel.<clinit>(vtkPanel.java:32) at SimpleVTK.<init>(SimpleVTK.java:26) at SimpleVTK.main(SimpleVTK.java:55)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile VTK with Java wrappers on (vtk.org). Run the cone example in step one of the tutorial (display is perfored without SWING), no problem. Run SimpleVTK, display of the same cone (same native libraries are loaded in the same order) now however the runtime error is generated.
WORKAROUND : Preload Xm library before running JVM, for instance, rather than running application directly $ java SimpleVTK preload the Xm library: $ LD_PRELOAD=/usr/X11R6/lib/libXm.so java SimpleVTK