Can a Java application call a cocoa library ?
I'd like to create a library using the cocoa features and call this library from my Java application using JNI.
For test purpose, I created a simple library which just loads a nib, but all I got is this exception :
"[NSJavaVirtualMachine initWithClassPath:] - cannot instantiate a Java virtual machine"
the entry point in the library looks like that :
JNIEXPORT void JNICALL Java_hello_test(JNIENV*env,jclass jc)
{
[NSBundle loadNibNamed"sample" owner:nil];
}
By the way, will I need to call [NSApp run] as if it was an application ?
Any help appreciated.
I'd like to create a library using the cocoa features and call this library from my Java application using JNI.
For test purpose, I created a simple library which just loads a nib, but all I got is this exception :
"[NSJavaVirtualMachine initWithClassPath:] - cannot instantiate a Java virtual machine"
the entry point in the library looks like that :
JNIEXPORT void JNICALL Java_hello_test(JNIENV*env,jclass jc)
{
[NSBundle loadNibNamed"sample" owner:nil];
}
By the way, will I need to call [NSApp run] as if it was an application ?
Any help appreciated.