java.io.IOException: Cannot run program "cmd /c dir": CreateProcess error=2, The system cannot find the file specified

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

You might be using the wrong way to add commands to the command line. Try using commandDownloader.add("command");

,
Expert tip

If you're trying to make a splash screen, check this tutorial: https://goo.gl/zQyCYe

Solutions on the web

via Coderanch by syruss kumar, 1 year ago
Cannot run program "cmd /c dir": CreateProcess error=2, The system cannot find the file specified
via raaviblog.com by Unknown author, 1 year ago
Cannot run program “jar” (in directory “C:\Watch “): CreateProcess error=2, The system cannot find the file specified
via apache.org by Unknown author, 2 years ago
Cannot run program "C:\xmlbeans-2.4.0\javac": CreateProcess error=2, The system cannot find the file specified
via Coderanch by Kaleeswaran Karuppusamy, 1 year ago
Cannot run program "\soffice": CreateProcess error=2, The system cannot find the file specified
via Stack Overflow by Mohanish Timble
, 2 years ago
Cannot run program "javac": CreateProcess error= 2, The system cannot find the file specified
via Stack Overflow by jenuine
, 2 years ago
Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at com.java.language.ExploreRuntimeProcess.executeProcess(ExploreRuntimeProcess.java:15)
at com.java.language.ExploreRuntimeProcess.main(ExploreRuntimeProcess.java:25)

Users with the same issue

Once, 1 month ago
Once, 3 months ago
3 times, 6 months ago
Once, 1 year ago
5 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.