【发布时间】:2015-02-14 16:28:55
【问题描述】:
在安装 UIMA 时,我在自述文件中得到了这些步骤
* 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.
我打开 /etc/environment 并执行了这个更改:
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"
执行之后:
UIMA/UIMA_SDK_1.4.5/bin# ./documentAnalyzer.sh
给出了这个错误:
./documentAnalyzer.sh: 2: .: Can't open /bin/setUimaClassPath.sh
documentAnalyzer.sh 代码:
#!/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
这里有什么错误?我想我正确设置了环境变量
【问题讨论】:
-
您的
PATH="...:/UIMA_HOME/bin"行是复制粘贴错误,或者您缺少$ -
应该是
PATH="...:$UIMA_HOME/bin" -
请
cat "$UIMA_HOME/bin/setUimaClassPath.sh"看看有没有错误提示。 -
得到这个
cat: /bin/setUimaClassPath.sh: No such file or directory@lesmana -
似乎没有定义
$UIMA_HOME。这可能有很多原因。最终的解决方案是确保定义了变量。
标签: linux path environment-variables