Hi,
Sorry to hear of the startup troubles; I think they can be quickly solved.  Here
are some suggestions.

The bottom line - I think the directions were written assuming you have two
Eclipse projects in your workspace, one for the uimaj-examples, and one for the
uimaj-tools itself.  This would be the case if you downloaded the source
distribution, unzipped (or untarred) it, and then used the Eclipse Import to
"import existing Maven projects".
But there's a work around.  Please read on...

When you say you cannot run them, are you trying to run them via Eclipse (run
menu), or the command line?

It sounds like you may have downloaded the UIMA Java SDK "binary" package and
unzipped or untarred it, is that correct?
Or did you download the source code, import it into Eclipse, and "built" it?

I'm guessing you may have done the "binary" package.  In that case there are a
couple of steps to do, described in the binary distribution's README - scroll
down to the part about setting the Environment Variables JAVA_HOME and
UIMA_HOME, and running UIMA_HOME/bin/adjustExamplesPaths.bat (or .sh if on 
linux).

I know you said you set UIMA_HOME as an "Eclipse" variable, but did you also set
it as an environment variable?

If you're running from Eclipse, go to the run configuration ( menu -> run -> run
configurations) and pick a tool, say for instance, the UIMA Document Analyzer,
and click it once to "open" it.  Then look at the "classpath" tab.  On my
installation, it shows under "User Entries" two projects:  "uimaj-tools" and
"uimaj-examples".  I suspect you only have an Eclipse Project for
"uimaj-examples", and are missing the one for uimaj-tools.

You can fix this by clicking on "User Entries", and then on the right on "Add
External Jars", and there add the uimaj-tools jar from the lib directory in the
unzipped UIMA Binary distribution.

If I've made wrong guesses about the details of your situation, please respond
back with the corrected details :-)

Good Luck! -Marshall

On 5/22/2015 9:36 AM, Lothar Diefenbaker wrote:
> Hello Everyone,
>
>  I recently become involved in a project with Apache UIMA. As I was totally
> unfamiliar with it as I was to eclipse, so I started reading the
> documentation from the very beginning and I try to follow the tutorials.
> But a problem came up when I tried to configure Eclipse to work with UIMA.
> I installed the UIMA plugins for eclipse from
> http://www.apache.org/dist/uima/eclipse-update-site, I followed all the
> steps in order to set it up, I added my UIMA_HOME to the Java Build Path in
> Eclipse. I imported the uimaj-examples but I cannot run them, when I tried
> to run any of the tools I get the Error: Could not find or load main class
> org.apache.uima.tools.AnnotationViewerMain (for example this happens when I
> tried to run the Annotation Viewer). I know this seems to be a path
> problem, so I checked the build path of the project and it does includes
> everything in my installation of UIMA, the lib is there with the jar of the
> tools. My environment variables of %UIMA_HOME%, %JAVA_HOME% exist and they
> hold as value the path of UIMA and JAVA respectively. I also included the
> lib directory of uima to the %CLASSPATH%, and the bin and lib directories
> of the uima to the %PATH%.
>
>  I tried to make the tutorial of “My first Annotator”, I created the
> project RoomNumberAnnotator and followed the tutorial step by step. But at
> the end when I tried to test it with the UIMA CAS Visual Debugger again I
> only got Error: Could not find or load main class
> org.apache.uima.tools.cvd.CVD since I cannot run the SDK tools from
> eclipse. I ran from the CVD from the console and it worked, and I loaded
> the analysis engine of RoomNumberAnnotator and it worked. Nevertheless I
> still cannot make it work from eclipse.
>
>  I looked for information about this and I didn't find much, which makes me
> think it's something too basic to solve to require help. Anyway I've been
> stuck with these days checking what can be wrong with my configurations of
> java, eclipse, and classpaths. Please If someone could help me with some
> advise or hint to solve these it would be much appreciated.
>
>  I'm running Eclipse Luna 4.4.2 with EMF tools and Maven (m2e), JDK
> 1.7.0_79, UIMA 2.7, all these over Ubuntu 14.
>

Reply via email to