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. Advertising

  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. Advertising

  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. 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. Unexplored Dimension

    Using Jpcap

    Unexplored Dimension, Mar 27, 2006, in forum: Java
    Replies:
    1
    Views:
    4,806
    IchBin
    Mar 27, 2006
  2. Christoph
    Replies:
    2
    Views:
    542
    Richard Bos
    Sep 17, 2003
  3. yikaikai
    Replies:
    2
    Views:
    1,676
    yikaikai
    Mar 21, 2007
  4. Raman
    Replies:
    5
    Views:
    1,071
    Raman
    May 9, 2008
  5. Greg Hauptmann
    Replies:
    4
    Views:
    211
    Stefano Crocco
    Feb 7, 2009
Loading...

Share This Page