From: Ferhan Mahmood (ferhan.mahmood@purplesoft.com)
Date: Tue Oct 01 2002 - 12:04:14 EDT
Hi all....
I am having a problem on the Solaris 8 (Sunblade 1000) operating system
(SPARC system)
I am trying to create a .so library which can be loaded into a java
application at runtime, using the System.loadLibrary() method. I get the
following error when running the java application:
----------------------------------------------------------------------------
----------
java.lang.UnsatisfiedLinkError: Can't load library:
/export/home/jim/libEngine.so
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.<init>(Throwable.java:94)
at java.lang.Error.<init>(Error.java:50)
at java.lang.LinkageError.<init>(LinkageError.java:43)
at java.lang.UnsatisfiedLinkError.<init>(UnsatisfiedLinkError.java:42)
at java.lang.ClassLoader.loadLibrary(Compiled Code)
at java.lang.Runtime.load0(Runtime.java:422)
at java.lang.System.load(System.java:755)
at EngineTester.main(EngineTester.java:282)
----------------------------------------------------------------------------
---------------
I suspect the problem lies in the generation of the .so file, because even
though the library is created, it is not being picked up by the library
loader at runtime. I am sure that the java envrionment is ok, and that the
LD_LIBRARY_PATH envionmental variable is defined to point to the directory
where the .so file lives.
The command in the makefile to generate the .so library is as follows:
----------------------------------------------------------------------------
-----------------
engine: $(OBJECT_FILES)
g++ -Bdynamic -G -lstdc++ -ll -G -DSOLARIS2 -o libEngine.so.1.1
$(OBJECT_FILES)
----------------------------------------------------------------------------
------------------
Could you please shed some light on this? Am I missing an option?
Cheers
Ferhan (ferhan.mahmood@purplesoft.com <mailto:ferhan.mahmood@purplesoft.com>
)
Purple Software Limited
Purple House
Corporation Street
High Wycombe
Buckinghamshire
HP13 6TQ
United Kingdom
Tel: +44 (0) 1494 750300
Fax: +44 (0) 1494 750301
This e-mail contains proprietary information some or all of which may be
legally privileged. It is intended for the recipient only. If an addressing
error or transmission error has misdirected this e-mail, please notify the
sender immediately or contact postmaster@purplesoftware.com. If you are not
the intended recipient you must not use, disclose, distribute, copy, print
or rely on this e-mail. The views expressed in this e mail are those of the
author and do not necessarily reflect the views of Purple Software Limited.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:01 EDT