On 6/12/14, 03:39 , Erik Jansman wrote:
Hello,
For a project I'm working on creating a VLC bundle in Felix. I'm
starting to wonder if trying to get VLC in a bundle is the right choice.
I'm running into what appears to be an import/export package problem.
VLC needs the uk.co.caprica.vlcj.binding package. So I have added it
both to the import and export-package in the MANIFEST.MF.
Does your bundle contain this package? If not, it should only import it,
not export it.
-> richard
When I try to
run a very small test, getting the version of VLC, I get a
/java.lang.NoClassDefFoundError: uk/co/caprica/vlcj/binding/LibVlc
error/ and according to Intellij this is Caused
by:/java.lang.ClassNotFoundException: *** Class
'uk.co.caprica.vlcj.binding.LibVlc' was not found because bundle
VideoActuator [7] does not import 'uk.co.caprica.vlcj.binding' /I find
this error strange since my manifest does import the package.
Just to try it I have added another uk.co.caprica.vlcj.binding to the
import field, this generates a duplicate import error, which does make
sense since it's already imported.
Am I overlooking something or should I proceed in a different way and
not use VLC in a bundle at all?
Below are the manifest and the source code of my test
Regards,
Erik Jansman
MANIFEST.MF:
Manifest-Version: 1.0
Bundle-Activator: VideoActuatorActivator
Bundle-ManifestVersion: 2
Bundle-Name: VideoActuator
Bundle-SymbolicName: VideoActuator
Bundle-Version: 1.0.0
Export-Package: uk.co.caprica.vlcj.binding
Import-Package: org.osgi.framework,uk.co.caprica.vlcj.binding
VideoActuatorActivator.java:
import com.sun.jna.Native;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import uk.co.caprica.vlcj.binding.LibVlc;
import uk.co.caprica.vlcj.version.LibVlcVersion;
/**
* Created by ejansman on 12/05/14.
*/
public class VideoActuatorActivator implements BundleActivator {
public void start(BundleContext Context){
System.out.println(" started VideoPlayerImplementation");
loadVLClibs();
}
private void loadVLClibs() {
Native.loadLibrary("libvlc", LibVlc.class);
LibVlcVersion.getVersion();
}
public void stop (BundleContext Context){
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org