I am seeing the same thing. I even modified your code to compile a text script and execute it. A simple finder directory item list takes over 2 minutes real time when I execute using "time" to measure it. I an runnign on a pristin 12" powebook that same with Panther installed. I am going to try doing and exec of 'osascript' to see if that is better.
Here is my code (modified from yours). It takes one command-line arg--a text fiel that is an Applescript.
public class RunScript
{
public static void main(String[] args)
{
// shared NSApplication
NSApplication.sharedApplication();
// read in script file
String scriptText = "";
try {
BufferedReader inStream = new BufferedReader(new FileReader(args[0]));
String inputLine;
I'm having the same experience. A script that used to work now takes a really long time. I've discovered that it's related to timeout and that the script will return in 2 * timeout seconds (default timeout is 1 minute, which is why you see the 2 minute duration). If you wrap your script in "with timeout of 10 seconds ... end" it will only take 20 seconds to execute.
Is there any forum for reporting bugs with the Applescript glue code?
Is there any forum for reporting bugs with the Applescript glue code?