Getting Jpcap to work in linux

Has anyone sucessfully installed this library?  What did you have to add to your classpath to get the examples to work?
Mach70803Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
Personally no. What problems are you having?
0
objectsCommented:
> What did you have to add to your classpath to get the examples to work?

nothing, just run the script.
It will add what it needs to the classpath.
0
Mach70803Author Commented:
This is what I get when I run the script.

using jpcap installed at ./
using libpcap libraries from /usr/lib
using Java VM at /opt/blackdown-jdk-1.4.2.01..
INFO: loading properties from /home/adbowers/jpcap-0.01.16/./properties/tool.properties
PacketCapture: loading native library jpcap.. Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/adbowers/jpcap-0.01.16/lib/libjpcap.so: /home/adbowers/jpcap-0.01.16/lib/libjpcap.so: cannot open shared object file: No such file or directory

The libjpcap.so file exists in that directory and with all the proper permissions.  If I copy that file into all the subdirectories, I get another error.  That particular one complaint about the classpath.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

jprgnCommented:
This library is not working.
I had project some thing like this , I tried alot but it did'nt worked
0
objectsCommented:
that error is occurring because libjpcap.so is not in your LD_LIBRARY_PATH
0
CEHJCommented:
Can you post the script?
0
Mach70803Author Commented:
Here is a link to the contents of the script:
http://www.cs.fsu.edu/~adbowers/jpcap.txt

I have set the LD_LIBRARY_PATH to the location of the .so file.

adbowers@hotbbq ~/jpcap-0.01.16 $ set | grep PATH
CLASSPATH=.
INFOPATH=/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/info:/usr/share/info/emacs-21
LD_LIBRARY_PATH=/home/adbowers/jpcap-0.01.16/lib
MANPATH=/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/3.4/man:/usr/share/man::/opt/blackdown-jdk-1.4.2.01/man
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4:/usr/X11R6/bin:/opt/blackdown-jdk-1.4.2.01/bin:/opt/blackdown-jdk-1.4.2.01/jre/bin:/usr/games/bin

adbowers@hotbbq ~/jpcap-0.01.16 $ set | grep JAVA
JAVAC=/opt/blackdown-jdk-1.4.2.01/bin/javac
JAVA_HOME=/opt/blackdown-jdk-1.4.2.01
0
CEHJCommented:
Can you also post the output when you try to run the script?
0
Mach70803Author Commented:
I did, it's in the third post.
0
CEHJCommented:
Oh - so it hasn't changed since then?
0
Mach70803Author Commented:
Nope, exact same thing.  Same thing if I run as root.
0
objectsCommented:
> I have set the LD_LIBRARY_PATH to the location of the .so file.

which is where exactly?
0
objectsCommented:
All I see in LD_LIBRARY_PATH is /home/adbowers/jpcap-0.01.16/lib which typically is not where the shared library resides.
0
CEHJCommented:
What happens when you open a new terminal and

echo $LD_LIBRARY_PATH

?
0
objectsCommented:
Please read the previous posts so you don't repeatedly ask question that are already answered.

0
objectsCommented:
Did you build the shared library you are using or is it the one provided?
0
CEHJCommented:
>>Please read the previous posts so you don't repeatedly ask question that are already answered.

I didn't ask you. That question has NOT been answered. You also reveal by your comments you have not read (or possibly understood) the script
0
objectsCommented:
ROTFL
0
Mach70803Author Commented:
Well I figured it out.  For some reason it doesnt not like my .so because it works fine on another machine.  I suspect it has something to do with the fact that I am running it on a unstable 64-bit Gentoo machine.  I can now run the script to launch the demo.  I still don't know how to write my own programs with it, but I can put that into another post.
0
objectsCommented:
Good to hear, thought it must have been a problem with your box not liking the shared file.
Perhaps try rebuilding it on that machine and see if that helps.
0
CEHJCommented:
>>I still don't know how to write my own programs with it,

The basics are really just that you need to load the library and call the methods
0
moduloCommented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.