I'm trying to invoke a method on a Jini service from an Ant script. I have created a custom Ant task that builds an object (a container for shipping class definitions to a central repository) of a bin dir. After the object is created, it should be sent to the central repository as an argument of the method I want to invoke. But the custom ant tasks throws a java.lang.NoClassDefFoundError: net/jini/core/lookup/ServiceRegistrar. This would indicate an incorrect classpath for my custom ant task. But the exception is thrown on the last of these two lines:
LookupLocator loc = new LookupLocator("jini://" + lusHost);
ServiceRegistrar reggie = loc.getRegistrar();
jsk-lib.jar and jsk-platform.jar are included in the classpath. I believe that they are found, because otherwhise the task would throw the NoClassDefFoundError on the first line of the two lines of code above.
It would seem that I have a classloader problem of some sort. Has any of you got experience with using Jini inside of custom Ant task? Any thoughts are welcome of course.