Hi all,

I need some advice / help

I have the following code:

import java.io.File;
import java.io.IOException;

public class testcreate {
private static void fcreate() {
// make file object
File file = new File("c:\\test.txt");
boolean success = false;
try {
// create file
success = file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
fcreate();
}
}


Which simply creates a file test.txt on c:\. When I run standalone all
is ok. The file is created as expected.

I need to able to call this from a policy so I have added a namespace
<policy xmlns:testcreate="http://www.novell.com/nxsl/java/testcreate">

copied the jar file to \novell\nds\lib (on windows). Edirectory is
restarted. I try and call the function using testcreate:fcreate() in
the policy via an xpath expression.

However I receive an error that the function cannot be found when I try
to restart the driver.

I can only conclude that my structure of the class is incorrect ? Does
anyone have any advice for me ?

Many thanks

J