Problem loading shared-library
Hi,
I wrote a Java GUI using JNI to interface a C++-library. On my primary system -Gentoo 64-bit with an Athlon64 processor- everything works fine. Actually, it should run on a Solaris system. As the C++ library is supposed to run on a 64-bit system, I installed the Java 64-bit edition on the Solaris system (that hosts a Sparc V9 processor). Compiling the library with gcc on the latter system resulted in a shared library named libSimulatorLib.so. The file command on this library brings up the following output:
libSimulatorLib.so:ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, stripped
So far everything seemed okay, but after invoking the Java GUI I got the following exception, when the library is being loaded:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /home/jan/workspace/bin/libSimulatorLib.so: Can't load Sparc v9 64-bit .so on a Sparc v9 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.jan.LogicSimulator.KernelInterface.SimulatorKernel.<clinit>(SimulatorKernel.java:15)
at org.jan.LogicSimulator.Resources.ResourceManager.getSimulator(ResourceManager.java:153)
at org.jan.LogicSimulator.SimulatorPane.startSimulation(SimulatorPane.java:622)
at org.jan.LogicSimulator.SimulatorDialog$OKLsnr.actionPerformed(SimulatorDialog.java:107)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I haven't found a similar message in the internet. Anyway, even this message means less than nothing to me, as it just mentions that the library is running on the system it is compiled for. Can anybody tell me what is going wrong?
Thanks,
Jan

