On Thu, 2013-09-05 at 18:17 -0700, Joe Templeman wrote:
Hi, I'm new to basex and I'm trying to build an external java library which will return a list of documents for me to then query, but I'm running into a problem where it can't seem to find the class.
This is the script I'm running:
declare namespace t = "java:com.inkling.modules.Test"; let $loader := t:new("local") return ( t:fileNames($loader) ) In my root project directory I have a subdirectory for my java files so I start up the baseX gui using
java -cp "BaseX76.jar:xmldblib/src/" org.basex.BaseXGUI
Is the file Test.class with the compiled byte code in src? Normally one keeps the source files there.
and my java file (in xmldblib/src/com/inkling/modules/Test.java looks like:
Is this complete content of the file? The package declaration and the import statements are missing.
public class Test { String env;
public Test(String environment) { env = environment; } public List<String> fileNames() { ...... }
}
When I try and run the xquery script, it just says Unknown Constructor Test.new(xs:string)
This example works fine for me.
Regards, Dimitar