[vtkusers] Strange behavior while loading VTK libraries from Java

kingvsk at aol.com kingvsk at aol.com
Wed May 29 01:22:45 EDT 2013


Hi all,

Please check the following code. If the class extends jcomponent , 
jbutton, jframe or any gui component then it works fine otherwise, it 
leads to unsatisfiedlinkerror.

Any Idea on this...

import javax.swing.JComponent;
import vtk.vtkNativeLibrary;

/**
  *
  * @author sathish
  */
@SuppressWarnings("serial")
public class Testing extends JComponent {
     // Load All VTK libraries...

     static {
         if (!vtkNativeLibrary.LoadAllNativeLibraries()) {
             for (vtkNativeLibrary lib : vtkNativeLibrary.values()) {
                 if (!lib.IsLoaded()) {
                     System.out.println(lib.GetLibraryName() + " not 
loaded");
                 } else {
                     System.out.println(lib.GetLibraryName() + " loaded");
                 }
             }
         } else {
             System.out.println("All Libraries are loaded");
         }
         vtkNativeLibrary.DisableOutputWindow(null);
     }

     // Main method...
     public static void main(String[] args) {
         // Core Stuff goes here...
         System.out.println("VTK Stuff");
     }
}

--
Sathish

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130529/e01789c3/attachment.htm>


More information about the vtkusers mailing list