From: Reino Ruusu Date: Fri, 8 Nov 2019 14:20:04 +0000 (+0200) Subject: Replace explicit AWT DLL loading with a class load of java.awt.Toolkit. X-Git-Tag: v1.43.0~134 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=336547b043ca6e4b7b9b1ebb0a1b0a051ccdef01;p=simantics%2F3d.git Replace explicit AWT DLL loading with a class load of java.awt.Toolkit. gitlab #50 Change-Id: Ib0bd5c507b2e3485264121f7fdf9a578bfef2c0a --- diff --git a/vtk/src/vtk/vtkJavaDep.java b/vtk/src/vtk/vtkJavaDep.java index d99566ae..62659392 100644 --- a/vtk/src/vtk/vtkJavaDep.java +++ b/vtk/src/vtk/vtkJavaDep.java @@ -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() { + + } }