On Feb 05, 2007, at 18:19 UTC, Steve Roy wrote: > I have an interesting problem this morning. I have a little > development tool written in REALbasic that needs to extract some > information from the sources of a Java application. Because of this, > parsing the Java stuff is much more easily done using Java.
Why is that? Does Java have some facilities for parsing Java code? (Forgive me if that's a dumb question -- it's been a long time since I last used Java.) > So I set > up a ServerSocket in my RB app and wrote a little Java command line > app that connects to the socket and passes the info to the RB app. Note that a ServerSocket is overkill here; you're not going to have more than one client, right? So just a regular TCPSocket, listening on a particular port, will work fine and be simpler. > This works just fine when I launch the Java app manually from the > command line or from Xcode. However when I launch the Java app from > my RB app, which is the intended use case, the RB app freezes and I > have to force quit it. How did you launch the Java app? My guess: you're using a Shell, and forgot to set it to Asynchronous mode. So the Run command doesn't return (nor does your RB app process any events) until the Java app finishes, and the Java app doesn't return until it's gotten an answer from your RB app. > I thought a deadlock was created so I tried using a thread instead to > run the Java app, but that doesn't help. Other threads can't run while the Shell is locked up with a synchronous call, either. > I run the Java app using the > Shell class in synchronous mode. Maybe that's the problem? Oops, yes. I should have read ahead. :) Best, - Joe P.S. Isn't it nice that you're using a mailing list where you can get such a quick answer? ;) -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe: <[EMAIL PROTECTED]> REAL Software has decided to consolidate this mailing list with the online Forums. On Monday, February 12, 2007, this mailing list will no longer be active. We encourage you to continue your REALbasic and REAL SQL Server discussions on the Forums. If you are not presently a member of the forum, please sign up today at <http://forums.realsoftware.com>.
