If you can get it to run that would mean a security flaw.
Said so...
- Grant your user permissions (become sudoer)
Invoke your java program with sudo
$ sudo java JavaCommandProg
This will prompt you for introducing sudo password when running jvm and then you can invoke sudo from inside your Java program.