ProcessBuilder
takes as parameter varargs (undefined number of arguments) where the first argument is the command to be executed (adb, in your case) and followed by arguments.
So, something like, where adb.toString()
is the full path to adb:
process = new ProcessBuilder(adb.toString(), "reboot");