Bug when using both Jpcap + jFreeChart Libs

Discussion in 'Java' started by Bentow, Sep 22, 2009.

  1. Bentow

    Bentow Guest

    Hello Everybody,

    I'm involved in a project using JpCap and Graphs.
    When I run my JPCAP application solely, it works just fine. But, when
    I add the jFreeChart + jCommon libraries to the classpath the
    following error appears on screen:
    --
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpcap in
    java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at jpcap.JpcapCaptor.<clinit>(JpcapCaptor.java:251)
    at core.ThreadRTP.main(ThreadRTP.java:82)
    --

    I filtered the error so I know it happens only when I add both
    libraries, if don't include them, it works just fine.
    Did anyone have problem with this, or something similar?

    Cheers
     
    Bentow, Sep 22, 2009
    #1
    1. Advertisements

  2. Bentow

    Bentow Guest

    On Sep 22, 4:26 pm, Bentow <> wrote:
    > Hello Everybody,
    >
    > I'm involved in a project using JpCap and Graphs.
    > When I run my JPCAP application solely, it works just fine. But, when
    > I add the jFreeChart + jCommon libraries to the classpath the
    > following error appears on screen:
    > --
    > Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpcap in
    > java.library.path
    >         at java.lang.ClassLoader.loadLibrary(Unknown Source)
    >         at java.lang.Runtime.loadLibrary0(Unknown Source)
    >         at java.lang.System.loadLibrary(Unknown Source)
    >         at jpcap.JpcapCaptor.<clinit>(JpcapCaptor.java:251)
    >         at core.ThreadRTP.main(ThreadRTP.java:82)
    > --
    >
    > I filtered the error so I know it happens only when I add both
    > libraries, if don't include them, it works just fine.
    > Did anyone have problem with this, or something similar?
    >
    > Cheers



    Solved!!!

    I don't know why, but after I add these 2 libraries, I need to
    explicitly put into the VM arguments:
    -Djava.library.path=c:\windows\system32\

    Crazy java eheheh

    Cheers.
     
    Bentow, Sep 22, 2009
    #2
    1. Advertisements

  3. In article
    <>,
    Bentow <> wrote:

    > On Sep 22, 4:26 pm, Bentow <> wrote:
    > > Hello Everybody,
    > >
    > > I'm involved in a project using JpCap and Graphs. When I run my
    > > JPCAP application solely, it works just fine. But, when I add the
    > > jFreeChart + jCommon libraries to the classpath the following error
    > > appears on screen:
    > > --
    > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpcap
    > > in java.library.path
    > >  at java.lang.ClassLoader.loadLibrary(Unknown Source)
    > >   at java.lang.Runtime.loadLibrary0(Unknown Source)
    > >   at java.lang.System.loadLibrary(Unknown Source)
    > >   at jpcap.JpcapCaptor.<clinit>(JpcapCaptor.java:251)
    > >   at core.ThreadRTP.main(ThreadRTP.java:82)
    > > --
    > > I filtered the error so I know it happens only when I add both
    > > libraries, if don't include them, it works just fine.
    > > Did anyone have problem with this, or something similar?

    >
    > Solved!!!
    >
    > I don't know why, but after I add these 2 libraries, I need to
    > explicitly put into the VM arguments:
    > -Djava.library.path=c:\windows\system32\


    This raises many questions. How was the code finding the DLL before you
    added the other libraries? Where did you add them? What classpath? Are
    there multiple versions? Are any in extension directories?

    <http://netresearch.ics.uci.edu/kfujii/jpcap/doc/install.html>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Sep 22, 2009
    #3
    1. Advertisements

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. Lordy
    Replies:
    1
    Views:
    1,399
    Lordy
    Sep 13, 2003
  2. Unexplored Dimension

    Using Jpcap

    Unexplored Dimension, Mar 27, 2006, in forum: Java
    Replies:
    1
    Views:
    4,968
    IchBin
    Mar 27, 2006
  3. Christoph
    Replies:
    2
    Views:
    680
    Richard Bos
    Sep 17, 2003
  4. Eelco

    jpcap unsatisfiedlinkerror

    Eelco, Nov 13, 2006, in forum: Java
    Replies:
    4
    Views:
    3,003
    Eelco
    Nov 14, 2006
  5. yikaikai
    Replies:
    2
    Views:
    2,081
    yikaikai
    Mar 21, 2007
  6. Raman
    Replies:
    5
    Views:
    1,350
    Raman
    May 9, 2008
  7. ABCL
    Replies:
    0
    Views:
    766
  8. Greg Hauptmann
    Replies:
    4
    Views:
    431
    Stefano Crocco
    Feb 7, 2009
Loading...