Problem with shell cmd in a JAVA api
Hi, is a pleassure for me belong to the community.
Well, I have a problem when I want to execute a shell cmd in a JAVA api.
I want to execute: "echo -n 0 > /dev/motor" to a device, but when I write "echo", this show in the console " 0 > /dev/motor"
doesn't execute the command in the device file.
this is the instruction in the code that I wrote:
Process p = Runtime.getRuntime().exec("echo 0 > /dev/motor");
Is there another way to write into the device file, without use "echo"?
Sorry for my english.