You can do so, but you require a tool/utilities which can connect to remote computer for example PStools utility, You may find similar on google. Once you get the tool, you can use java
Runtime.getRuntime() to execute command prompt commands.
To know more about PStool here is the link
http://www.howtogeek.com/school/sysinternals-pro/lesson8/all/[
^]
Hope this info helps you.
Regards,
Panduranga.