Invisible steamroller! Applescript+Helma
"Breton Slivka" <[email protected]> Wed, 21 Nov 2007 22:50:24 +1100
| Newsgroups | gmane.comp.java.helma.general |
|---|---|
| Message-ID | <[email protected]> |
Hello all, I've been using helma for some weeks now, and I have come up against a bit of a challenge which is stressing my rather limited knowledge of Java. My main goal is being able to execute an applescript from helma. I know this is possible from Java- and is demonstrated in exhibit a: http://www.oreilly.com/pub/a/mac/2003/02/25/apple_scripting.html?page=1 The main problem is all this classpath business. My first instinct was to check that the apple classes are just simply there on Mac systems- no go. In the article's example, the /system/library/java directory is added to the -classpath argument both when compiling and executing the java code. So, from my previous experience with using databases from javascript- Adding stuff to Helma's classpath is as easy as dumping jar files in helma's lib/ext. Problem is (nearly) all the files in /system/library/java are .class files, not jar. On the off chance that they might work anyway, I tried copying the directory into helma's lib/ext. Still no love from helma- the cocoa classes do not appear in helma. I also tried modifying the start.sh, to add a -classpath argument, but that didn't really work either. My next trick will be figuring out how to package all these com.apple class files up in a JAR, and add that. however, with encouragement from Chris Zumbrunn, I decided to post here first to see if anyone has done this before, and could offer some advice and possibly save me hours of fruitless blind trial and error. Thanks all, -Breton