In terminal mode on my linux desktop I can mount a server/workstation directory with the following line:
sudo -S mount -t cifs -w -o username=service -o password=service //192.168.2.75/jobs /home/microcut/shared
This successful mounts the shared directory locally on my linux desktop.
When I use the Jshell command in the following code block:
I get the following error:
Error: org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "sudo -S mount -t cifs -w -o username=service -o password=service //192.168.2.75/jobs /home/microcut/shared" (in directory "/home/microcut"): error=2, No such file or directory)
I am assuming this error has something to do with the working directory. But no matter how I define the working directory, I cannot get the program to run without an error. The working directory is valid, otherwise allot of my other code the relieson this directory definition would not be working.
Can anyone point me in a proper direction here?
sudo -S mount -t cifs -w -o username=service -o password=service //192.168.2.75/jobs /home/microcut/shared
This successful mounts the shared directory locally on my linux desktop.
When I use the Jshell command in the following code block:
Jshell:
shl.Initialize("net","sudo -S mount -t cifs -w -o username=service -o password=service //192.168.2.75/jobs /home/microcut/shared",Null)
shl.WorkingDirectory = "/home/microcut"
shl.RunWithOutputEvents(1000)
Sub net_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
If Success And ExitCode = 0 Then
Log("Success")
Log(StdOut)
Else
Log("Error: " & StdErr)
End If
End Sub
I get the following error:
Error: org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "sudo -S mount -t cifs -w -o username=service -o password=service //192.168.2.75/jobs /home/microcut/shared" (in directory "/home/microcut"): error=2, No such file or directory)
I am assuming this error has something to do with the working directory. But no matter how I define the working directory, I cannot get the program to run without an error. The working directory is valid, otherwise allot of my other code the relieson this directory definition would not be working.
Can anyone point me in a proper direction here?