I've tried the following:
[[NSWorkspace sharedWorkspace] openFile:@"/Users/tharvey/Desktop/Test.jar" withApplication:@"/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java"];
Which throws an error in the console about being unable to start the java app and also:
NSTask *javaApp = [[NSTask alloc] init];
[javaApp setLaunchPath:@"/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java"];
NSArray *javaAppArguments = [[NSArray alloc] init];
javaAppArguments = [NSArray arrayWithObjects:@" -jar ", @"/Users/tharvey/Desktop/Test.jar", nil];
[javaApp setArguments:javaAppArguments];
[javaApp launch];
However the above code doesn't work; and doesn't throw an error.
Unless launching the jar will work on it's own?