Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleEvents from a multiplatform Java app?



Greetings,
It works fine for me (1.4.2_05 on OSX 10.3.5)...  I had to add a small:

public static void main(String args[]) {
  Scripttest foo = new Scripttest();
}

Compiling from the command line, I had to use:
javac -classpath /System/Library/Java Scripttest.java
java -classpath /System/Library/Java:. Scripttest

Interestingly, the first time I ran it, nothing appeared to happen. 
The second, and subsequent times I ran it, it worked fine, albiet a
bit oddly slow.  (It's possible I killed it too quickly the first
time, I wasn't sure of how long it was going to take.)

I know nothing of substance about the Apple-specific classes (except
that Google is your friend), but you might want to add some checking
of the return value (NSAppleEventDescriptor) and potential errors that
are written into dictionary by the myScript.execute(errors); call.

Now, as for using them in XPlat apps, you'll need to do some mildly
heavy reflection, so as not to try to resolve those classes at
runtime...

--  Morgan Schweers

On Tue, 28 Sep 2004 16:39:48 +0200, Alexander Lohse <email@hidden> wrote:
> > I have some JNIDirect, like JDirect used to be, that shows some of
> > this. Mostly Carbon a little Cocoa.
> 
> I will check that out.
> 
> >> All I found was something like this:
> >
> > Looks fine
> 
> Yes it does. But does not work ... :-(
> 
> Do have any idea why?
> 
> 
> 
> Regards,
> 
> Alex
 _______________________________________________
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

References: 
 >AppleEvents from a multiplatform Java app? (From: Alexander Lohse <email@hidden>)
 >Re: AppleEvents from a multiplatform Java app? (From: Mike Hall <email@hidden>)
 >Re: AppleEvents from a multiplatform Java app? (From: Alexander Lohse <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.