Re: The "Cant load v4l4j JNI library" error comes out when I run my own jar program with v4l4j inside.

384 views
Skip to first unread message

Nicola Cadenelli

unread,
Jul 14, 2012, 4:02:26 AM7/14/12
to v4...@googlegroups.com


On 14 July 2012 05:44, Rusty20 <jonrus...@gmail.com> wrote:
Good Day,

     I have created my own program using the v4l4j API. When I'm running the program in eclipse it works fine, but after making the project to a .jar and tried to run it using
the terminal, the "Cant load v4l4j JNI library" error comes out.

Thank you for your time.

--
You received this message because you are subscribed to the Google Groups "v4l4j" group.
To view this discussion on the web visit https://groups.google.com/d/msg/v4l4j/-/1QvFj78ly8sJ.
To post to this group, send email to v4...@googlegroups.com.
To unsubscribe from this group, send email to v4l4j+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/v4l4j?hl=en.

Do you have the "lib" folder, where there is the "v4l4j.jar" file, in the same position of your program's jar file?
--
Nicola Cadenelli
cell. +39 3346550271
Skype: nicolacdnll

Gilles

unread,
Jul 15, 2012, 7:16:09 PM7/15/12
to v4...@googlegroups.com
Hi there,
can you tell me the full path to:
- libv4l4j.so
- libvideo.so
- v4l4j.jar
- your app's jar file

Also what is the exact command you use to run your app.
Thanks
Gilles


On Sunday, July 15, 2012 2:18:44 AM UTC+10, Rusty20 wrote:
"Do you have the "lib" folder, where there is the "v4l4j.jar" file, in the same position of your program's jar file?"

I tried that but still didn't work.
I tried it in my Ubuntu and it works fine, but when I do the same in my CentOS the error keeps on coming out.

Gilles Gigan

unread,
Jul 16, 2012, 11:27:00 PM7/16/12
to v4...@googlegroups.com
What command do you use to run your app ?
Gilles

On 17 July 2012 12:59, Rusty20 <jonrus...@gmail.com> wrote:
> my jar file is just in the Desktop
>
> --
> You received this message because you are subscribed to the Google Groups
> "v4l4j" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/v4l4j/-/DCbRVNi_2XAJ.

Gilles

unread,
Jul 18, 2012, 6:04:00 AM7/18/12
to v4...@googlegroups.com
Can you try to run this:
java -Djava.library.path=/usr/lib/jni -cp /usr/share/java/v4l4j.jar au.edu.jcu.v4l4j.examples.DumpInfo
and post  the output

also run this:
ldd /usr/lib/jni/libv4l4j.so
and post the output

Gilles

On Tuesday, July 17, 2012 7:42:39 PM UTC+10, Rusty20 wrote:
First i just tried "java -jar myjar.jar" then I also tried "java -jar myjar.jar -Djava.library.path=/usr/lib/java -cp /usr/share/java/v4l4j.jar".

Alok Kumar

unread,
Mar 20, 2014, 7:02:42 AM3/20/14
to v4...@googlegroups.com
Try using java -Djava.library.path=/usr/lib/jni -cp /usr/share/java/v4l4j.jar -jar myjar.jar instead. it will work.
Reply all
Reply to author
Forward
0 new messages