0

While installing UIMA I got this steps in readme file

* Set JAVA_HOME to the directory of your JRE installation you would like to use for UIMA. * Set UIMA_HOME to the apache-uima directory of your unpacked Apache UIMA distribution * Append UIMA_HOME/bin to your PATH * Please run the script UIMA_HOME/bin/adjustExamplePaths.bat (or .sh), to update paths in the examples based on the actual UIMA_HOME directory path. This script runs a Java program; you must either have java in your PATH or set the environment variable JAVA_HOME to a suitable JRE. 

I opened /etc/environment and perfomed this changes:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/UIMA_HOME/bin" JAVA_HOME="/usr/lib/jvm/java-7-openjdk-i386" UIMA_HOME="/root/Desktop/karim/software/UIMA/UIMA_SDK_1.4.5" 

after that executed:

UIMA/UIMA_SDK_1.4.5/bin# ./documentAnalyzer.sh 

which gave this error:

./documentAnalyzer.sh: 2: .: Can't open /bin/setUimaClassPath.sh 

documentAnalyzer.sh code :

#!/bin/sh . "$UIMA_HOME/bin/setUimaClassPath.sh" if [ "$JAVA_HOME" = "" ]; then JAVA_HOME=$UIMA_HOME/java/jre fi "$JAVA_HOME/bin/java" -cp "$UIMA_CLASSPATH" -Xms128M -Xmx900M "-Duima.home=$UIMA_HOME" "-Duima.datapath=$UIMA_DATAPATH" -DVNS_HOST=$VNS_HOST -DVNS_PORT=$VNS_PORT "-Djava.util.logging.config.file=$UIMA_HOME/Logger.properties" com.ibm.uima.reference_impl.application.docanalyzer.DocumentAnalyzer 

What is the mistake here? I guess I set environment variable correctly

5
  • your PATH="...:/UIMA_HOME/bin" line is either a copy paste error or you are missing a $ Commented Dec 16, 2014 at 11:27
  • it should be PATH="...:$UIMA_HOME/bin" Commented Dec 16, 2014 at 11:31
  • please do cat "$UIMA_HOME/bin/setUimaClassPath.sh" and see whether there are error messages. Commented Dec 16, 2014 at 11:37
  • getting this cat: /bin/setUimaClassPath.sh: No such file or directory @lesmana Commented Dec 16, 2014 at 11:44
  • it seems that $UIMA_HOME is not defined. this can have many causes. ultimately the solution is to make sure that the variable is defined. Commented Dec 16, 2014 at 23:36

2 Answers 2

1

I think the answers given about adding the $ to the variable UIMA_HOME in your PATH variable are correct, but, I think you are also lacking the EXPORT command for your variables. Look, after you set their values, you should also writhe this in /etc/environment:

export UIMA_HOME export JAVA_HOME export PATH 

That way, you would be able to use them later (always remember to fix the PATH variable with the $UIMA_HOME as well).

If this does not work, try rebooting your computer after setting the variables as I said.

In the case that does not work either, try repeating the process and in a console (after doing everythin all over again) try using the following command:

source /etc/environment 

Fianlly, if that does not work, try setting the variables in the file called /etc/profile (do the same process: setting the varialbes and exporting them), and this should work.

Sign up to request clarification or add additional context in comments.

Comments

0

The order of variable assignments in your /etc/environment is wrong; in order to use $UIMA_HOME in the PATH=..., you have to define UIMA_HOME afore, e. g.

UIMA_HOME="/root/Desktop/karim/software/UIMA/UIMA_SDK_1.4.5" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$UIMA_HOME/bin" JAVA_HOME="/usr/lib/jvm/java-7-openjdk-i386" 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.