/** * Load the shared libraries. */ static void loadLibrary() { try { File dir = Files.createTempDirectory("libjsass-").toFile(); dir.deleteOnExit(); if (System.getProperty("os.name").toLowerCase().startsWith("win")) { System.load(saveLibrary(dir, "sass")); } System.load(saveLibrary(dir, "jsass")); } catch (Exception exception) { LOG.warn(exception.getMessage(), exception); throw new LoaderException(exception); } }
/** * Load the shared libraries. */ public static void loadLibrary() { try { File tmpDir = new File(System.getProperty("java.io.tmpdir")); File dir = File.createTempFile("libjsass-", ".d", tmpDir); dir.delete(); dir.mkdir(); dir.deleteOnExit(); if (System.getProperty("os.name").toLowerCase().startsWith("win")) { System.load(saveLibrary(dir, "sass")); } System.load(saveLibrary(dir, "jsass")); } catch (Exception exception) { System.err.println(exception.getMessage()); exception.printStackTrace(System.err); throw new RuntimeException(exception); } }