The reflected .java file will cache the initial value set in the script. If the value is updated from a .set() the cached value will be updated. .get() returns the cached value.
For performance reason we do not update the cached value when written from the script. To send a value back to a .java file you can either read back from an rs_allocation or use rsSendToClient*() from the script.