Sub btnADD_Action
Try
sh.Initialize("sh", "jar uvf dwn.jar Files/settings.txt", Null)
sh.WorkingDirectory = File.DirApp
sh.Run(-1)
Catch
Log(LastException.Message)
End Try
End Sub
Sub sh_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
ExitApplication
End Sub
not work exception:
Error: org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "jar uvf dwn.jar Files\settings.txt" (in directory "D:\Desktop\_SRC_B~1\_B4J_D~1\Objects"): CreateProcess error=2, Impossibile trovare il file specificato)
Does this code execute from within dwn.jar? If you are trying to modify a currently running .jar file, you might run into problems with Windows forbidding write access to the .jar file.