I researched this question and all answers suggest visudo to add: Defaults:user !requiretty It does not work! I have two Linux boxes (RedHat). I have a Java class which uses ProcessBuilder/Process to execute commands. The class runs under a system account. On both boxes, I run and provide the password for other-user in an input stream to the Process object.
Tag: processbuilder
Java Command Line on Different OS’s
Okay, so I am using process builder to launch an independent java process from the current java process, using the code: to test it, just as a simple questin, will the command always be “java -jar something.jar,” on all operating systems? and if not, what are the formats for mac and linux? Answer The answer is complicated. Some of the
opening a shell and interacting with its I/O in java
I am trying to open a shell (xterm) and interact with it (write commands and read the shell’s output) Here is a sample of code which won’t work: When I execute this program an “xterm” window opens and the “ls” command is not entered. Only when I close the window I get a “-1” printed and nothing is read from