Subj : Stop executeReader from host JVM? To : netscape.public.mozilla.jseng From : jeff Date : Thu Aug 25 2005 02:27 pm Is there a way to stop the execution of a Javascript from Java code? I have an application which hosts Rhino and executes scripts using Context.executeReader Bu what if my script has an infinite loop such as: while(true()) {} If I have a thread waiting for executeReader to complete, I can have a timeout after which I kill execution. So my question is, how can I tell the context to _stop_ executing? Context.exit doesn't work 'cause the thread calling Context.exit is different from the thread doing the execution. Can I just kill or interrupt the executing thread? Thanks, jeff .