views:

40

answers:

0

I am trying to get the IKPicutreTaker Cocoa widget to work under Rococoa and I am getting an error I don't quite understand. Here is a link to the IKPicutreTaker docs:

http://developer.apple.com/Mac/library/documentation/GraphicsImaging/Reference/IKImagePicker%5FClass/IKImagePicker%5FReference.html#//apple%5Fref/occ/clm/IKPictureTaker/pictureTaker

and here is my code:

import org.rococoa.*;
import org.rococoa.NSObject;
import org.rococoa.Rococoa;
public interface IKPictureTaker extends NSObject {

    public static final _Class CLASS =
            Rococoa.createClass("IKPictureTaker",_Class.class);

    public interface _Class extends NSClass {
        IKPictureTaker pictureTaker();
    }
    int runModal();
}

class test {

    public static void main(String[] args)
    {
        IKPictureTaker picTaker = IKPictureTaker.CLASS.pictureTaker();
        picTaker.runModal();   
    }
}

This code compiles fine but when I run javac on the class it creates I get this error:

Exception in thread "main" java.lang.NoClassDefFoundError: IKPictureTaker (wrong name: com/agentsheets/component/depictioneditor/IKPictureTaker)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

Any ideas?