![JAR search and dependency download from the Maven repository](/logo.png)
org.ghost4j.GhostscriptLibraryLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ghost4j Show documentation
Show all versions of ghost4j Show documentation
Java wrapper for Ghostscript API
/*
* Ghost4J: a Java wrapper for Ghostscript API.
*
* Distributable under LGPL license.
* See terms of license at http://www.gnu.org/licenses/lgpl.html.
*/
package org.ghost4j;
import com.sun.jna.Native;
import com.sun.jna.Platform;
/**
* Native Ghostscript API loader.
*
* @author Gilles Grousset ([email protected])
*/
public class GhostscriptLibraryLoader {
/**
* Load native library according to host OS.
*
* @return The loaded library.
*/
protected static GhostscriptLibrary loadLibrary() {
// library name
String libName = "gs";
// on Windows: library has a different name according to the
// architecture
if (Platform.isWindows()) {
// architecture
String arch = System.getProperty("sun.arch.data.model");
libName = "gsdll" + arch;
}
return (GhostscriptLibrary) Native.loadLibrary(libName,
GhostscriptLibrary.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy