The short answer is no. Rhino doesn't have any global variables that you can use.
You will have to change the code of the Java application and add a new global variable to the execution context of Rhino. The Java code then needs to remember the value of the variable somewhere when the script is finished and put it again into the context when the scripts should run again.