I think you have two options.
One of them is to use JNI to call your own code to get the battery level.
Another is to call the application pmsetusing System.execin java and parse the output. I think the arguments for extracting the battery level are pmset -g ps, but it is better to check the man page