The problem is not with Fuseki. The java documentation states that when using the java
command with the -jar
option,
the JAR file is the source of all user classes, and other user class path settings are ignored.
Simply adding the jar file with the user defined functions to the CLASSPATH
variable will not solve the problem as that environment variable will be ignored. Additionally, using the --classpath
or -cp
option will also be ignored.
In order for Fuseki to be able to load the jar files, you need to add the location to your jar file with your user defined functions to the Class-Path key in the fuseki-server.jar's manifest file.
To do this, run:
jar umf manifest-file fuseki-server.jar
manifest-file:
Class-Path: path/to/functions/udf.jar
As reference, this describes the process of adding classes to a jar files class path in more detail.