I'll take a look at your exec replacement.
As far passing in arbitrary options, nsjava already supports this. Classpath is hardcoded, but it is also possible to set arbitrary java options using the ns_param JavaOption keyword. You would do something like:
ns_param JavaOption foo=bar