Java don't load a library

Discussion in 'Java' started by Andrea, Sep 8, 2005.

  1. Andrea

    Andrea Guest

    I have to launch a java class wich load a library (Lpktgen). the library is
    in the same directory of the .java file. why have I this error?:

    [root@localhost codice]# java Ipktgen
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no Lpktgen in
    java.li brary.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at Ipktgen.main(Ipktgen.java:6)
     
    Andrea, Sep 8, 2005
    #1
    1. Advertising

  2. On Thu, 08 Sep 2005 12:30:19 +0200, Andrea wrote:
    > I have to launch a java class wich load a library (Lpktgen). the library is
    > in the same directory of the .java file. why have I this error?:
    >
    > [root@localhost codice]# java Ipktgen
    > Exception in thread "main" java.lang.UnsatisfiedLinkError: no Lpktgen in
    > java.li brary.path


    Set LD_LIBRARY_PATH so that it includes the directory containing the
    library, or use -Djava.library.path.

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Sep 8, 2005
    #2
    1. Advertising

  3. Andrea

    Andrea Guest

    Gordon Beaton wrote:

    > On Thu, 08 Sep 2005 12:30:19 +0200, Andrea wrote:
    >> I have to launch a java class wich load a library (Lpktgen). the library
    >> is in the same directory of the .java file. why have I this error?:
    >>
    >> [root@localhost codice]# java Ipktgen
    >> Exception in thread "main" java.lang.UnsatisfiedLinkError: no Lpktgen in
    >> java.li brary.path

    >
    > Set LD_LIBRARY_PATH so that it includes the directory containing the
    > library, or use -Djava.library.path.
    >
    > /gordon
    >

    I'm sorry but I'm a Linux newbie which is the command to set the
    LD_LIBRARY_PATH?
     
    Andrea, Sep 8, 2005
    #3
  4. Andrea wrote:
    > Gordon Beaton wrote:
    >
    >
    >>On Thu, 08 Sep 2005 12:30:19 +0200, Andrea wrote:
    >>
    >>>I have to launch a java class wich load a library (Lpktgen). the library
    >>>is in the same directory of the .java file. why have I this error?:
    >>>
    >>>[root@localhost codice]# java Ipktgen
    >>>Exception in thread "main" java.lang.UnsatisfiedLinkError: no Lpktgen in
    >>>java.li brary.path

    >>
    >>Set LD_LIBRARY_PATH so that it includes the directory containing the
    >>library, or use -Djava.library.path.
    >>
    >>/gordon
    >>

    >
    > I'm sorry but I'm a Linux newbie which is the command to set the
    > LD_LIBRARY_PATH?


    You might find the following useful:
    http://www.dynamic-apps.com/tutorials/classpath.jsp

    Pan
    --
    TechBookReport Java: http://www.techbookreport.com/JavaIndex.html
     
    TechBookReport, Sep 8, 2005
    #4
  5. Andrea <> writes:

    > I'm sorry but I'm a Linux newbie which is the command to set the
    > LD_LIBRARY_PATH?


    You can also set the java.library.path system property instead:

    java -Djava.library.path=/path/to/dir YourApp
     
    Tor Iver Wilhelmsen, Sep 8, 2005
    #5
  6. Andrea

    Roedy Green Guest

    Roedy Green, Sep 8, 2005
    #6
  7. Andrea

    Roedy Green Guest

    On 08 Sep 2005 16:49:40 +0200, Tor Iver Wilhelmsen
    <> wrote or quoted :

    >You can also set the java.library.path system property instead:
    >
    >java -Djava.library.path=/path/to/dir YourApp


    Be careful with that approach. If anything ELSE is using the
    java.library.path that code will stop working.

    If you do it that way, I would use Wassup to find out the current
    value of java.library.path and set it to a new value that includes the
    current path.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 9, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DP
    Replies:
    0
    Views:
    1,178
  2. Krystian
    Replies:
    0
    Views:
    426
    Krystian
    Nov 30, 2006
  3. jalkadir
    Replies:
    2
    Views:
    404
  4. Jason
    Replies:
    0
    Views:
    227
    Jason
    Jul 6, 2004
  5. Sammy
    Replies:
    1
    Views:
    337
    NET_NET_2003
    Aug 18, 2003
Loading...

Share This Page