Page 1 of 1

My Simple Java vlc player (JVLC)

Posted: 29 Nov 2009 18:26
by rafsabac
Here you can see my simple vlc player (coded in java) with some basic functions.
It's been developed in Eclipse 3.5.1. External jars used: "jna.jar" and "jvlc-core-1.0.0-SNAPSHOT".

Exported project in jar file: http://www.megaupload.com/?d=8LTJICU1

Source code: http://www.megaupload.com/?d=W4HW5RXK

Re: My Simple Java vlc player (JVLC)

Posted: 29 Nov 2009 19:59
by StErMi
I can't donwload the exported JAR (i think megaupload need a little time :) ), I want to know a thing:

if you try to create an executable of your project using launch4j do you got the error that say that the program can't compile couse it doesn't find the libvlc module?

This is my primary problem!

Re: My Simple Java vlc player (JVLC)

Posted: 30 Nov 2009 00:17
by rafsabac
Download link is ok, just open it, enter code on the right side, wait 45 seconds and start downloading.

I use File/Export function in eclipse and it works just fine.

Re: My Simple Java vlc player (JVLC)

Posted: 30 Nov 2009 17:44
by StErMi
This is what I was talking about.

The real problem with JVLC is that when you try to create an exe with the jar , it doesn't work couse it can't find the libvlc.dll

Here you can see the .exe created with your jar. The .exe is in the same directory of libvlc.dll

Image

Re: My Simple Java vlc player (JVLC)

Posted: 30 Nov 2009 21:46
by rafsabac
I have never used launch4j and i generaly avoid all unnecessary modifications of jar file.

Re: My Simple Java vlc player (JVLC)

Posted: 30 Nov 2009 22:21
by StErMi
I used launch4j becouse in #java irc channel they suggest me to use it.

I need to bring my player from .jar to an .exe application, and when I do it ( I think that the problem is with every sw that you will use ) and try to run it, it say that it can't find the vlclib module.

Re: My Simple Java vlc player (JVLC)

Posted: 07 Feb 2010 13:06
by whome
You could give JVM options to Launch4j project, pointing to a folder where libvlc.dll is found. Maybe it helps you get going. Commandline looks like this example, give "java.library.path" to one or more folders where .dll files are found.

jnidispatch.dll is taken from jna-3.0.9.jar file, I'm not sure if you need to do it but do some experiment. You may point vlc folder to the actual c:\program files\videolan\vlc\ folder. Vlc plugin folder being used by JVLC java component should point to the same vlc root you are using in a library.path.

c:\test\
c:\test\vlc\
c:\test\vlc\libvlc.dll
c:\test\vlc\libvlccore.dll
c:\test\vlc\*<rest from vlc media player>
c:\test\lib\jnidispatch.dll

Code: Select all

c:\test> java.exe -Djava.library.path=./vlc;./lib -classpath ./classes;./lib/myapp.jar com.mypackage.MyApp