[Kde-java] UnsatisfiedLinkError

Olivier Dragon dragonoe at mcmaster.ca
Wed Oct 6 19:39:15 CEST 2004


On Wed, Oct 06, 2004 at 07:18:05PM +0200, Marco Ladermann wrote:
> Am Mittwoch, 6. Oktober 2004 18:44 schrieb Clint Allen:
> > Hi everyone, this is my first post to the list, hope I'm not asking a FAQ.
> At least, it should be a FAQ! ;)
 
Indeed! I got stumped over that one too...

> > Exception in thread "main" java.lang.UnsatisfiedLinkError: newKDialogBase
> >         at org.kde.koala.KDialogBase.<init>(KDialogBase.java:330)
> >         at ws.olympus.kde.java.kifupdown.Main.main(Main.java:122)
> 
> This exception is thrown typically if you forgot to call 
> org.kde.qt.qtjava.initialize(). This method is static and can be invoked by 
> the "main" or in a static initializer of your classes.
> 
> static {
>   // initialize the toolkit
>   org.kde.qt.qtjava.initialize();
> }

Actually that error will probably keep happening because he's using a
KDE class, not a QT one. So you must have

static
{
    org.kde.qt.qtjava.initialize();     // init QT
    org.kde.koala.kdejava.initialize(); // init KDE
}

Make sure you have both even if you program using only KDE classes as
KDE depends on QT.

-Olivier

-- 
          __-/|    ? ?     |\-__
     __--/  /  \   (^^)   /  \  \--__
  _-/   /   /  /\ / ( )  /\  \   \   \-_
 /  /   /  /  /  (   ^^ ~  \  \  \   \  \
 / Oli Dragon    ( dragonoe at mcmaster.ca \
/  B.Eng. Sfwr   (     )    \    \  \    \
/  /  /    /__--_ (   ) __--__\    \  \  \
|  /  /  _/        \_ \_       \_  \  \  |
 \/  / _/            \_ \_       \_ \  \/
  \_/ /                -\_\        \ \_/
    \/                    )         \/
                        *~
        ___--<***************>--___
       [http://dragon.homelinux.org]
        ~~~--<***************>--~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/kde-java/attachments/20041006/d0a3ac6d/attachment.pgp


More information about the Kde-java mailing list