java.io.IOException: Cannot run program "java" (in directory ".\NewFolder???"): CreateProcess error=267, The directory name is invalid

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 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 GitHub by geebioso
, 6 months ago
Cannot run program "make" (in directory "C:\Users\Garren\Dropbox\cmdstan-2.5.0\cmdstan"): CreateProcess error=2, The system cannot find the file specified ```
via GitHub by Rassibassi
, 1 year ago
Cannot run program "make" (in directory "C:\Users\HIDEME\Documents\PhD\Courses\BayesianDataAnalysis\cmdstan"): CreateProcess error=2, The system cannot find the file specified
via hortonworks.com by Unknown author, 1 year ago
Cannot run program “/usr/lib/hadoop/bin/hadoop” (in directory “/home/ec2-user”): error=13, Permission denied
via hortonworks.com by Unknown author, 2 years ago
Cannot run program “/usr/lib/hadoop/bin/hadoop” (in directory “/home/ec2-user”): error=13, Permission denied
java.io.IOException: Cannot run program "java" (in directory ".\NewFolder???"): CreateProcess error=267, The directory name is invalid
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at undefined.ExecGB18030.main(ExecGB18030.java:14)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 2 months ago
151 more bugmates

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