I try to run this command:
java -jar "C:\programa.jar"
Using:
OleObject ole_wsh
integer iRet
string scmd
ole_wsh = Create OleObject
iRet = ole_wsh.ConnectToNewObject("WScript.Shell")
if iRet<0 then
DESTROY ole_wsh
MessageBox("No se pudo conectar a windows shell", "Error: " + String(iRet))
Return
end if
scmd = 'java -jar "C:\programa.jar"'
iRet = ole_wsh.Run(scmd, 2, TRUE)
if iRet <> 0 then
MessageBox("No se pudo ejecutar el comando " + scmd, "Error: " + String(iRet))
end if
ole_wsh.DisconnectObject ( )
DESTROY ole_wsh
But the application show:
Power Builder application execution error (R0035)
Error: Error calling external object function run at line ### in clicked event of object pb_execute of...
When i use the command "calc" that´s ok