2
votes

First of all, this may come as a very noob question to all of you. But as they say, if you don't ask, How do you learn?

So, here's the thing:

We've developed this .JAR file to work under Java 1.4, and installed in SUSE 9 Enterprise Server.

We have also tested it in different platforms: - Suse 9 Enterprise Server 32 bits + JDK 1.4.2_08 + LIBSTDC++.SO.6: Runs smoothly, no error returned.

  • Red Hat 5.5 Server 64 bits + JDK 1.4: Runs smoothly, no error returned.

  • Suse 9 Enterprise Server 64 bits + JDK 1.4.2_08 (32 bits) + LIBSTDC++.SO.6: If I use the 32 bits libraries of my program, it returns an error saying: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/MySharedLibrary.so: /usr/lib/MySharedLibrary.so: undefined symbol: NFQuality"

BUT, if I use the 64 bits libraries of my program, it returns this error: "Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib64/MySharedLibrary64.so: /usr/lib64/MySharedLibrary64.so: cannot open shared object file: No such file or directory

I've tried giving the java -Djava.library.path command with the path where the MySharedLibrary is, but it didn't work.

My question is:

WHY would it return an error in Suse 9 64 bits, if it does have the exact same configuration as Suse 9 32 bits?

I understand there's a difference between architectures, alright. But it isn't an architecture compilation matter, since in RedHat 5.5 with 64 bits it does run.

Can anyone guide me through this puzzle? What are my possible solutions?

Thank you all you Gurus out there.

1

1 Answers

0
votes

You can't link 64 bit libraries from a 32 bit JVM. If you want to link 64-bit libraries use 64-bit java.

As for the undefined symbol. It's possible you have a broken link because suse is missing some library that was present on redhat. I don't believe the question can be answered without knowing more about MySharedLibrary.so.