Problem running ELAN from compiled sources
Up one level
Problem running ELAN from compiled sources
hello,
I compiled ELAN on Windows XP using the ELAN-3_7_0-src.zip distribution.
Compilation finished OK, but I have problems running it.
I tried to run using main: mpi.eudico.client.annotator.ELAN
and giving as argument a full path to a test .eaf file.
I get the following error (excerpts):
INFO: External launch thread started...
Using Windows Native Media Player DS
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jniwrap in java.library.path.
The ELAN window does appear, with the title "Initializing...".
My Java version:
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Any hints?
Matija
Re: Problem running ELAN from compiled sources
The message indicates that one of the necessary libraries can not be found (is not in the path). It concerns the JNIWrapper library that is needed for playing media files in ELAN using DirectShow.
Do you run ELAN with the Ant build script? If all is well, the Ant build script takes care of setting the library path as well as the classpath.
(I tried unzipping the source zipfile and everything seems to work well, without having to change anything. But maybe I'm missing something?)
-Han
Re: Re: Problem running ELAN from compiled sources
Do you run ELAN with the Ant build script? If all is well, the Ant build script takes care of setting the library path as well as the classpath....Well, I did not give the complete information: in fact I created a project with Eclipse, using the option "Create a Java project from an existing Ant buildfile on the file system" which further explains "Create a new Java project based on the specification of a javac task in the Ant buildfile." The project ran OK and the compilation finished successfully. Then I defined a Run configuration, which launches the main: mpi.eudico.client.annotator.ELAN with the following arguments: "C:\Exel_AMORCES\ELAN_logiciel\Example set\elan-example3.eaf" -Djava.library.path="C:\Program Files\Java\jre6\bin;C:\WINDOWS\system32;C:\WINDOWS;lib/java/jmf__Vwin2.1.1a;lib/java/jniwrapper__V3.5" -Djava.ext.dirs="lib/java/java.ext.dir;C:\Program Files\Java\jre6\lib\ext" -DPreferredMediaFramework="NativeWindows" (I examined the build.xml file to extract this information). The error messages from my initial post are from the attempt to run this configuration. I also tried to run the "start" target of the build.xml, again from within Eclipse; in this case I get some "not found" errors which seem to be due to the fact that Ant under Eclipse can't follow symbolic links. I finally dropped the attempts to run from Eclipse and defined a .bat file which calls java with the same arguments as given above: this is now working OK. I would still like to know how one is supposed to run the Ant's "start" target on Windows, outside a development environment such as Eclipse -- as far as I understand Ant, this is a builder, not a program launcher...?
Re: Re: Re: Problem running ELAN from compiled sources
Well, Ant can be used to launch an application as well. We have attempted to create a source distribution that can be build and run by means of the Ant file. So, normally the command
> ant (or >ant start)
should compile and launch ELAN.
Eclipse is more convenient if you want to develop and it should be possible to run the application in that way as well. I think the problem in your example is that the paths in "-Djava.library.path" to "jmf" and "jniwrapper" can not be resolved. Replacing "lib/java/jmf__Vwin2.1.1a" by the absolute path to "jmf__Vwin2.1.1a" and the same for the path to "jniwrapper__V3.5", might solve your problem. You could probably also use some Eclipse variables like "${project_path}" or "${workspace_loc}" to construct the path to the libraries, but using absolute paths should work anyway. (Check if the jars in "lib" have all been added to the classpath.)
I hope this helps.
-Han