How can I set the tool power supply voltage from java?

There is no polyscope API for that function. You have to send set_tool_voltage command directly to controller.
Take a look on this forum post to get something to start from.