zippy1978 / ghost4j

Java wrapper for Ghostscript C API + PS/PDF document handling API
http://www.ghost4j.org
GNU Lesser General Public License v3.0
64 stars 38 forks source link

Ghost4j is unable to detect 'gs' in Solaris. #22

Open rameswar opened 11 years ago

rameswar commented 11 years ago

Hello Zippy,

In my solaris machine ghostscript is there and it is working by 'gs' command. But while running the ghost4j sample examples it showing the following error:

ERROR: Unable to load library 'gs': ld.so.1: java: fatal: libgs.so: open failed: No such file or directory java.lang.UnsatisfiedLinkError: Unable to load library 'gs': ld.so.1: java: fatal: libgs.so: open failed: No such file or directory at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239) at com.sun.jna.Library$Handler.(Library.java:140) at com.sun.jna.Native.loadLibrary(Native.java:393) at com.sun.jna.Native.loadLibrary(Native.java:378) at org.ghost4j.GhostscriptLibraryLoader.loadLibrary(GhostscriptLibraryLoader.java:39) at org.ghost4j.GhostscriptLibrary.(GhostscriptLibrary.java:34) at org.ghost4j.Ghostscript.initialize(Ghostscript.java:323) at gs.util.GhostscriptUtil.convertPDFtoTIF(GhostscriptUtil.java:113) at gs.util.test.GhostscriptUtilTest.main(GhostscriptUtilTest.java:27)

Could you help me on this?

Regards, Rameswar

zippy1978 commented 11 years ago

Hi,

I don't know Solaris much...

It seems that JNA does not search the shared lib at the right place. To fix that, you can set the jna.library.path property to the directory containing your gs.so.

If it does not work: please tell me the path and the filename of the gs native lib on Solaris (maybe it is named differently from other Unix).

Regards, Gilles