I am new to Linux help me on the following:
How to restart the linux machine using Java and it tried using Runtime.exec method using the following command sudo shutdown -r now and it asks for password, how do i proceed from here.Please help me out.
I am new to Linux help me on the following:
How to restart the linux machine using Java and it tried using Runtime.exec method using the following command sudo shutdown -r now and it asks for password, how do i proceed from here.Please help me out.
You will need to configure sudo so that your user does not require a password to execute the reboot command.
This is straightforward; read the man page for sudoers.
The command
reboot
Is a shortcut.