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: runtime.exec



The trace shows this as the string passed to runtime.exec:
Launching /usr/bin/osascript -e 'tell application "Safari" to open loacation " file:/Users/rocks/Desktop/TestC/eclipse/plugins/org.eclipse.webrowser_3.0.1/home/home.html "'

But from yours and others suggestions, I need to spend some time looking at the code more closely. The string is built up in parts and may not look exactly the same to the call. The trace output is just a print statement, more or less. Since it works ok from the shell it is more likely a problem of how it is passed and may indeed be waiting on stdin when it shouldn't. The code was written to support a simple call with a parameter and developed on a windows platform. IBM added support for linux later when they donated it to the eclipse project and I'm trying to make it work on OS X. I'm not sure if there aren't problems on linux as well. I thought this would just be a problem of creating the right entries in a configuration file. But I admit it has been more fun than that.


Greg Guerin wrote:
David Rocks <email@hidden> wrote:


  I have run into more problems. When I try to run osascript through
runtime.exec in a java program it appears to go into la-la land. I see
no activity, and it also appears that the interface is hung.


Use 'kill -QUIT pid' to get a thread-dump from the wedged Java app.



Not the behavior using the open command or calling the browser
directly. There I can see trace records everytime I call the plugin. The
call statement looks OK in the trace. And I have no problem with
identical calls in the apple script editor or issuing the commands in
the terminal shell. Is there something different about the way osascript
is executed when called from within a program?


Exactly what command and args is being exec()'ed?

Is any output produced on stdout or stderr?

Exactly what is the command and args when the exec() works?

  -- 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
_______________________________________________
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: 
 >Re: runtime.exec (From: Greg Guerin <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.