This was discussed here recently - read the archives.
The short answer is no, not without active participation from the script itself. You have to arrange for your script to periodically check some variable, and set that if you want to "interrupt" your script.
But some ideas for building such support into BeanShell were tossed around..

From: [] On Behalf Of MICHAEL PITONIAK
Sent: Friday, February 13, 2004 4:50 PM
Subject: [Beanshell-users] Stopping an interpterer that is sourcing a script?

 If a long script has been sourced from a file, is there a way to interrupt the interpreter and have it exit gracefully?