-7

I am trying to execute a cmd command to crash an app from java like

String command = "@upwork.exe --args -url=chrome://crash  -disable-web-security -script-url=https://172.27.68.6/pre_alpha/";
Process p = Runtime.getRuntime().exec(command);

The issue is the command runs fine and crashes the app, but I get a failure

java.io.IOException: Cannot run program "@upwork.exe": CreateProcess error=2, The system cannot find the file specified

I am not sure why this is happening. Any suggestions would be of great help

Neha Bajpai
  • 167
  • 1
  • 4
  • 12

2 Answers2

0

Your code is trying to run @upwork.exe, which it can't find. Does this file exist?

Steve Smith
  • 2,244
  • 2
  • 18
  • 22
0

As your exception log says, The system cannot find the file specified

Try to give full path of @upwork.exe file.

acikojevic
  • 915
  • 1
  • 7
  • 16