In case you find it useful, there is already a project which uses uglifyJs with Rhino (as well as many other existing js compressors, like packerJs, YuiCompressor, GoogleClosure, DojoShrinkSafe, etc):
wro4j (web resource optimizer for java)
Regards,
Alex