From 336547b043ca6e4b7b9b1ebb0a1b0a051ccdef01 Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Fri, 8 Nov 2019 16:20:04 +0200 Subject: [PATCH] Replace explicit AWT DLL loading with a class load of java.awt.Toolkit. gitlab #50 Change-Id: Ib0bd5c507b2e3485264121f7fdf9a578bfef2c0a --- vtk/src/vtk/vtkJavaDep.java | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) 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() { + + } } -- 2.47.1