]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Replace explicit AWT DLL loading with a class load of java.awt.Toolkit. 83/3483/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Fri, 8 Nov 2019 14:20:04 +0000 (16:20 +0200)
committerReino Ruusu <reino.ruusu@semantum.fi>
Fri, 8 Nov 2019 14:20:04 +0000 (16:20 +0200)
gitlab #50

Change-Id: Ib0bd5c507b2e3485264121f7fdf9a578bfef2c0a

vtk/src/vtk/vtkJavaDep.java

index d99566ae9d92d7ca0a2fbb31f548bb49db98df88..626593928624f572e72e861619987d849ce7fc9a 100644 (file)
@@ -8,9 +8,6 @@ package vtk;
  */
 public class vtkJavaDep {
          static String[] libs = new String[] {
-                         "awt",
-                         "jawt",
-                         
                          "vtksys",
                          "vtkCommonCore",
                      "vtkWrappingJava",
@@ -123,14 +120,20 @@ public class vtkJavaDep {
                      "vtkIOImportJava",
 
                      };
-         
-         
-         static {
-                 for (String lib : libs)
-                         System.loadLibrary(lib);
-         }
-         
-         static void load() {
-                 
-         }
+
+
+       static {
+               try {
+                       Class.forName("java.awt.Toolkit");
+               } catch (ClassNotFoundException e) {
+                       throw new IllegalStateException(e);
+               }
+
+               for (String lib : libs)
+                       System.loadLibrary(lib);
+       }
+
+       static void load() {
+
+       }
 }