Shay Well-Known Member Licensed User Longtime User Jun 21, 2021 #1 if I am putting notepad.exe in the same directory it is working, when putting 1.exe which is java app that was created using b4j it will not run with the following error Error: org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "1.exe" (in directory "C:\DEV\GAMES\One"): CreateProcess error=2, The system cannot find the file specified) B4X: Copy shl.Initialize("shl","1.exe",Null) dir = "C:\DEV\GAMES\One\" shl.WorkingDirectory = dir shl.Run(10000) 'set a timeout of 10 seconds 'StartMessageLoop 'need to call this as this is a console app.
if I am putting notepad.exe in the same directory it is working, when putting 1.exe which is java app that was created using b4j it will not run with the following error Error: org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "1.exe" (in directory "C:\DEV\GAMES\One"): CreateProcess error=2, The system cannot find the file specified) B4X: Copy shl.Initialize("shl","1.exe",Null) dir = "C:\DEV\GAMES\One\" shl.WorkingDirectory = dir shl.Run(10000) 'set a timeout of 10 seconds 'StartMessageLoop 'need to call this as this is a console app.
DonManfred Expert Licensed User Longtime User Jun 21, 2021 #2 Shay said: Exit value: -559038737 Click to expand... the error is coming from 1.exe... Check the output of running the debug.bat Looks like it is throwing an error.... Upvote 0
Shay said: Exit value: -559038737 Click to expand... the error is coming from 1.exe... Check the output of running the debug.bat Looks like it is throwing an error....
Daestrum Expert Licensed User Longtime User Jun 21, 2021 #3 Did you just copy the .exe file to the new folder? You have to copy the folders in objects/temp/build too to the same directory (If I remember correctly) Last edited: Jun 21, 2021 Upvote 0
Did you just copy the .exe file to the new folder? You have to copy the folders in objects/temp/build too to the same directory (If I remember correctly)
Shay Well-Known Member Licensed User Longtime User Jun 21, 2021 #4 double clicking 1.exe is working fine also trying to open run_debug.bat from the jshell gives the same error of course I took the full directory - running the file from the dir. or from windows run command is working fine is there other way to run it (maybe not via jshell? or using java command - similar to the run_debug) Upvote 0
double clicking 1.exe is working fine also trying to open run_debug.bat from the jshell gives the same error of course I took the full directory - running the file from the dir. or from windows run command is working fine is there other way to run it (maybe not via jshell? or using java command - similar to the run_debug)
Erel B4X founder Staff member Licensed User Longtime User Jun 22, 2021 #5 Try it with the full path: Code: Copy Dim dir As String = "C:\DEV\GAMES\One") shl.Initialize("shl",File.Combine(dir, "1.exe"),Null) Upvote 0
Try it with the full path: Code: Copy Dim dir As String = "C:\DEV\GAMES\One") shl.Initialize("shl",File.Combine(dir, "1.exe"),Null)
Shay Well-Known Member Licensed User Longtime User Jun 23, 2021 #6 @Erel this solve the issue, thanks a lot Upvote 0