I have a shell script which I'm trying to call from Java. The shell script contains:
cat /dev/tty.USB0 > file.txt
In my Java code I am using:
Process p= Runtime.getRuntime().exec("/home/myname/Scrivania/capture.sh");
But it does not work. When I run it from the terminal it works as expected.