• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

UnsatisfiedLinkError

 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Experts,
iam running a client server program in all operating system since java is platform independent thats why i have choosen to program in that it is working fine in windows and unix but when iam running in the linux it is showing
java.lang.UnsatisfiedLinkError with following statements


as i have never encountered this exception previously i didnt understand what exactly the problem please help me please tell what it exactly represents iam just using normal java swing applications which comes in awt package because it is working in unix and windows but only in linux it is causing problem and also iam uisng 64 bit machine of linux whether this matter whether i should use 32 bit please help me, please give me some clear idea of above all.
Thanks in advance.
 
Ranch Hand
Posts: 354
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is your JRE, Sun's or some other?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
/usr/lib64/libgcj.so.5.0.0

This part of the code shows that you are running GNU Java, which comes standard with most Linux distributions because it's a fully open-source version of Java.

Unfortunately, GNU Java is an incomplete and very slow implementation of Java 1.4.

Install Sun's Java for Linux and use that instead of GNU Java. How you should do that depends on what flavour of Linux you are using. For Ubuntu it would be:
 
vin Hari
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you ,
for reply please may i know is there any way to know which JRE my system is using so that i can check which JRE linux is using so that i can replace it please tell me.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Type

from your console.
 
vin Hari
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you for your quick reply,
please can you tell me how can i know that GNU is installed here not the suns JRE is there any way, and also how to install this JRE in lnux as iam new to linux please experts help me.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If let's say you have GNU Java installed, you'll see something like when you enter java -version.

whereas for Sun Java, you'll see something like this.


Which Linux distro do you use? If you use, Ubuntu or any Debian-based distro. it's very simple. Type this from your terminal.

For other distros, it's a bit complicated because you need to download it manually and replace the GNU Java with Sun Java.

Hope this helps.
 
vin Hari
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you thanks a lot,
really it is worth but when i did the java -version in linux
i got the message like this


can you please tell me what it suggest and what i should do for this,
thanks in advance.
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
vin, you are using GNU Java. Install Sun Java instead.

Henry and I have already suggested that you install Sun Java. How to do that exactly depends on what Linux distribution you are using. It looks like you are using Red Hat Linux (probably Fedora or RHEL). Lookup in the documentation of your Linux distribution how to install Java using the package management system.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some things to watch out for:

There are 2 ways to install Sun Java on Red Hat/Fedora. One is via an RPM, the other is using the generic ".bin" install, which works for all Linux systems. The only thing special that the RPM does is:

1. Installs the JDK as a subdirectory tree under /usr/java
2. Makes a note in the RPM database that you've installed that particular package.

Other than the above, an install from the bin or an install from an RPM give exactly the same results. I recommend that if you do install from the bin, you move the installed JDK under /usr/java (you may have to create this directory). I like keeping my JVMs and JDKs in a common location - makes them easier to keep up with.

Modern-day releases of Fedora and Ubuntu Linux install gcj as part of the default install, and they wired it in using the Debian "alternatives" system. if you do a "ls -l /usr/bin/java", you can see part of that mechanism.

You can tell the alternatives system to use other Java implementations, though it's not pretty. However, many of the J2EE systems reference an environment variable named JAVA_HOME, so a good way to handle this is to put something like the following in your ".bash_profile":



I'm setting up environments for Maven and Ant at the same time. You don't have to go that far if you don't want to.
 
reply
    Bookmark Topic Watch Topic
  • New Topic