Andy Wolpert <email@hidden> wrote:
>I want to call NSAppleScript from a Java+Swing application.
>
>I get a NoClassDefFoundError err.
What is the application's classpath?
Exactly how are you executing the application when the NoClassDefFoundError
occurs?
>A simple command line program compiled with javac works fine, as does a
>Cocoa+Java application.
What is the simple command line program? Do you mean a program that refers
to the NSAppleScript class?
What is your command-line environment? How is it set up? Double-clicked
app's aren't shell programs, so they don't get env-vars set by your .shrc
file.
A Cocoa+Java application, as built by Xcode, will normally contain the
following in its classpath:
/System/Library/Java/
A Java Swing application will not. So if you want it in the classpath, you
have to put it there.
That directory is where the com/apple/... directory is rooted, which is
where the NSAppleScript.class file is located. Note that the Cocoa-Java
classes are provided as loose class-files, not a jar.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden