[ 
https://issues.apache.org/jira/browse/JENA-1035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14909273#comment-14909273
 ] 

Andy Seaborne commented on JENA-1035:
-------------------------------------

A quick workaround is to set PATH to pick up 
{noformat}
PATH=... fuseki-server ....
{noformat}
The {{fuseki}} service script already has {{$JAVA}}.

A proper fix might be:
{noformat}


if [ -z "$JAVA" ]
then
    if [ -z "$JAVA_HOME" ]
    then
       JAVA=$(which java)
    else
        JAVA=$JAVA_HOME/bin/java
    fi
fi

if [ -z "$JAVA" ]
then
  echo "Cannot find a Java JDK. Please set either set JAVA or put java (>=1.8) 
in your PATH." 2>&2
  exit 1
fi

exec $JAVA ...
{noformat}

and apply this to the command script template as well.



> fuseki-server script ignores JAVA_HOME variable while it executes the "java" 
> command
> ------------------------------------------------------------------------------------
>
>                 Key: JENA-1035
>                 URL: https://issues.apache.org/jira/browse/JENA-1035
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: Fuseki
>    Affects Versions: Fuseki 2.3.0
>            Reporter: Mirko Kaempf
>            Priority: Minor
>
> The fuseki-server script ignores JAVA_HOME variable while it executes the 
> "java" command.
> I use Java 7 on my system and only for FUSEKI2.3 I installed Java 8 at this 
> time. I had to change the script to be able to start FUSEKI. I think the 
> script should be changed in general to use a JAVA_HOME variable if defined.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to