我正在尝试设置 Fuseki,我已经按照文档进行了操作,但我对 Fuseki 不熟悉。我在终端中指定了路径。

 $ /Users/rumplestilskin/Downloads/jena-fuseki-0.2.7/fuseki-server --update --mem /ds

我收到错误:
Can't find jarfile to execute

我不确定 jarfile 需要在哪里才能找到它。 fuseki-server.jar 当前与 fuseki-server 位于同一目录中。

最佳答案

您需要设置环境变量 FUSEKI_HOME :

$ /usr/local/lib/jena-fuseki-0.2.7/fuseki-server --mem /ds
Can't find jarfile to run

$ FUSEKI_HOME=/usr/local/lib/jena-fuseki-0.2.7 /usr/local/lib/jena-fuseki-0.2.7/fuseki-server --mem /ds
08:42:46 INFO  Dataset: in-memory
08:42:46 INFO  Home Directory: /usr/local/lib/jena-fuseki-0.2.7
08:42:46 INFO  Dataset path = /ds
08:42:46 INFO  Fuseki 0.2.7 2013-05-11T22:05:51+0100
08:42:46 INFO  Started 2013/06/28 08:42:46 EDT on port 3030

实际上,fuseki-server 脚本似乎应该根据 fuseki-server 中的以下代码尝试猜测这一点。
export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"

if [ ! -e "$FUSEKI_HOME" ]
then
    echo "$FUSEKI_HOME does not exist" 1>&2
    exit 1
    fi
FUSEKI_HOME 的实际描述在 fuseki (不是 fuseki-server )脚本中:
$ grep -B 1 -A 3 -m 1 FUSEKI_HOME /usr/local/lib/jena-fuseki-0.2.7/fuseki
#
# FUSEKI_HOME
#   Where Fuseki is installed.  If not set, the script will try
#   to guess it based on the script invokation path.
#

关于sparql - Fuseki “Can' t 找到要运行的 jarfile”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17364846/

10-13 01:13