Hello, I am trying to execute a command (date) contained in an executable batch file, this file must be executed to correct the time on Linux computers since the automatic and manual time are modified from time to time, so from my jar file I send the instruction to create the file with the correct time that I get from my server, and I need to execute the command 'sudo date -s 'Correct date and time' but with jshell the batch file is not executed. The file has +x execution permissions, if I run it from the terminal it makes the modification on system, I hope you can help me. thank you so much.
Dim TextWriter1 As TextWriter
TextWriter1.Initialize( File.OpenOutput( File.DirApp , "lahora.sh", False))
TextWriter1.WriteLine("sudo date -s '" & pday & " " & pmonth & " " & pyear & " " & phour & ":" & pminut & ":" & "00'")
TextWriter1.Close
Dim shl As Shell
shl.Initialize("shl", "lahora.sh", Null)
shl.WorkingDirectory = "/home/schuser/kalisys"
shl.Run(-1)