problem with tuto of jvcl [SOLVED]

This forum is about all development around libVLC.
moijdikssekool
Blank Cone
Blank Cone
Posts: 29
Joined: 06 Jun 2011 03:35

problem with tuto of jvcl [SOLVED]

Postby moijdikssekool » 06 Jun 2011 04:08

hi
i try to launch the 'myplayer.java' test thanks to this tuto but i have a crash, the console says it doesn't find libvlc:
The required native libraries are named "libvlc.dll" and "libvlccore.dll".

In the text below <libvlc-path> represents the name of the directory containing "libvlc.dll" and "libvlccore.dll".

There are a number of different ways to specify where to find the native libraries:
1. Include NativeLibrary.addSearchPath("libvlc", "<libvlc-path>"); at the start of your application code.
2. Include System.setProperty("jna.library.path", "<libvlc-path>"); at the start of your application code.
3. Specify -Djna.library.path=<libvlc-path> on the command-line when starting your application.
4. Add <libvlc-path> to the system search path (and reboot).
so i follow the advices:
change the path and reboot
Image
include System.setProperty("jna.library.path", "C:/Program Files (x86)/VideoLAN/VLC"); in the main application

Image
add -Djna.library.path="C:\Program Files (x86)\VideoLAN\VLC" to the argument of the program argument

Image

but no way, nothing happens.
I see my version of VLC is 1.1.9. I guess vlcj works only with vlc 1.2.0? But where can i get it? i don't find it
Last edited by moijdikssekool on 06 Jun 2011 18:33, edited 1 time in total.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: problem with tuto of jvcl

Postby sherington » 06 Jun 2011 08:23

Did you try #1? It is the most reliable, that's why it's #1.

Are you using a 32-bit JDK?

In your Eclipse Run Configuration, you put -Djna.library.path in the "Program arguments" - that is wrong, it goes in the "VM arguments".

And vlcj 1.1.5.1 does work with vlc 1.1.9. Your problem is not a version problem.

A lot of people do have vlcj+vlc working on Windows so you have some other problem.

moijdikssekool
Blank Cone
Blank Cone
Posts: 29
Joined: 06 Jun 2011 03:35

Re: problem with tuto of jvcl

Postby moijdikssekool » 06 Jun 2011 13:35

that's why it's #1.
#1? u mean change path and reboot? yes...

i put

Code: Select all

-Djna.library.path="C:\Program Files (x86)\VideoLAN\VLC"
in the VM argument, but it's like i put nothing
if i get off the quote of the path

Code: Select all

-Djna.library.path=C:\Program Files (x86)\VideoLAN\VLC
the console says
java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
my jdk is 64bits, i forgot to precise i'm on win7 64 and work with Eclipse
vlc seems to be a 32bits version (stored in Program Files (x86), is that a problem?

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: problem with tuto of jvcl

Postby sherington » 06 Jun 2011 15:27

By #1, I meant this:

Code: Select all

1. Include NativeLibrary.addSearchPath("libvlc", "<libvlc-path>"); at the start of your application code.
Anyway, that's all beside the point.

You can not load 32-bit DLL's in a 64-bit Java Virtual Machine.

You need to use a 32-bit JDK, or you need to get a 64-bit build of vlc.

moijdikssekool
Blank Cone
Blank Cone
Posts: 29
Joined: 06 Jun 2011 03:35

Re: problem with tuto of jvcl

Postby moijdikssekool » 06 Jun 2011 18:31

You need to use a 32-bit JDK
ok that's it
now i have a black screen but no played media

Code: Select all

private void start(final String[] args) { mediaPlayer.playMedia("F:/CINEMA/Les Shadok - Mythe Ou Légende.avi"); }
and i try it on 3 differents PC (XP, win7, 32 and64bits)
but don't care, i will find why
thx

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: problem with tuto of jvcl

Postby sherington » 06 Jun 2011 20:21

now i have a black screen but no played media

Code: Select all

"F:/CINEMA/Les Shadok - Mythe Ou Légende.avi"
I have heard of people having problems with accented characters in filenames on vlc+Windows before, maybe that's your problem.

Check logs for error messages.

Try the test player that ships with vlcj.

moijdikssekool
Blank Cone
Blank Cone
Posts: 29
Joined: 06 Jun 2011 03:35

Re: problem with tuto of jvcl [SOLVED]

Postby moijdikssekool » 06 Jun 2011 21:09

I have heard of people having problems with accented characters in filenames on vlc+Windows before, maybe that's your problem.
no, but i put the avi at the root of the eclipse project and it works now, the way "F:/CINEMA/" is a problem for the mediaPlayer.playMedia() function... Is there a security problem?

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: problem with tuto of jvcl [SOLVED]

Postby sherington » 06 Jun 2011 21:32

I have heard of people having problems with accented characters in filenames on vlc+Windows before, maybe that's your problem.
no, but i put the avi at the root of the eclipse project and it works now, the way "F:/CINEMA/" is a problem for the mediaPlayer.playMedia() function... Is there a security problem?
I don't know about any security problem, is there anything in the error log? Is F: a network drive? I think some people before have reported problems opening files across network drives. In any event, that particular problem is not a vlcj problem.

rshetty00
Blank Cone
Blank Cone
Posts: 34
Joined: 23 Feb 2012 03:49

Re: problem with tuto of jvcl [SOLVED]

Postby rshetty00 » 13 Mar 2012 23:16

sorry - did you get it to work under VLC 32 bit and JDK 32 bit OR both 64 bit?
Also, -Dgna path spec. Did you use quotes (" ") or Not?!

I'm trying to do what exactly done in video, but getting same errors as you are (windows 7 64 bit, vlc and JDK both 64 bit. vlcj 2.0.0-dist)

Thanks in advance

rshetty00
Blank Cone
Blank Cone
Posts: 34
Joined: 23 Feb 2012 03:49

Re: problem with tuto of jvcl [SOLVED]

Postby rshetty00 » 14 Mar 2012 00:30

No worries. Resolved myself


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests