java.io.IOException: Cannot run program "java -jar ~/Documents/Java/myJar.jar": error=2, No such file or directory

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

,

Provide a working directory instead of pointing it to a file or an empty directory in process builder.

,
Expert tip

This is a bug in some versions of the Arduino IDE. Try updating to the version 1.6.12 or further.

Solutions on the web

via Stack Overflow by Aaron
, 1 year ago
Cannot run program "java -jar ~/Documents/Java/myJar.jar": error=2, No such file or directory
via Stack Overflow by Aprendiz
, 1 year ago
Cannot run program "keytool -genkeypair -keystore teststore.jks -alias alias -keyalg RSA -keysize 2048 -dname "CN=name, OU=ou, O=o, C=pt" -validity 365 -keypass ssc1415 -storepass ssc1415 -noprompt": error=2, No such file or directory
via Google Groups by Keeeeefy, 2 years ago
Cannot run program "bash": error=2, No such file or directory
via GitHub by manueljacob
, 1 year ago
Cannot run program "test/java_vm/bin/java" (in directory "test"): error=2, No such file or directory
via GitHub by tezcan10
, 2 years ago
Cannot run program "svd": error=2, No such file or directory
via Stack Overflow by Mohsin Ali
, 2 years ago
Cannot run program "TextEdit": error=2, No such file or directory
java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at com.mycompany.DHSLauncher.Launcher.lambda$4(Launcher.java:109)
at java.util.Optional.ifPresent(Optional.java:159)
at com.mycompany.DHSLauncher.Launcher.showLogin(Launcher.java:102)
at com.mycompany.DHSLauncher.Launcher.start(Launcher.java:35)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

Users with the same issue

2 times, 1 month ago
Once, 1 month ago
Once, 2 months ago
15 times, 3 months ago
6 times, 3 months ago

Write tip

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