Closed kayst09 closed 7 years ago
Just replace "\" by "/"
"C:/Program Files/Java/jdk1.8.0_131/bin"
On Thu, Aug 10, 2017 at 1:47 PM, kpeng9 notifications@github.com wrote:
Hello. I've been reading some posts regarding setting up and the "failed to start the program" and it seems like everyone has a different issue and whenever I tried their method it doesn't work.
My tasks.json { "version": "2.0.0", "type": "shell", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared" }, "isBackground": true, "suppressTaskName": true, "tasks": [ { "taskName": "build", "command": "javac", "args": ["-g", "${file}"] } ] }
My launch.json { "version": "0.2.0", "configurations": [ { "name": "Java", "type": "java", "request": "launch", "stopOnEntry": true, "preLaunchTask": "build", "jdkPath": "C:\Program Files\Java\jdk1.8.0_131\bin", "cwd": "${fileDirname}", "startupClass": "${fileBasenameNoExtension}", "classpath": [ ".", "${fileDirname}" ], "args": [] } ] }
I keep getting the > Failed to start the program, Error: spawn C:rogram Filesavadk1.8.0_131�in\java ENOENT
[image: 3] https://user-images.githubusercontent.com/20728761/29186532-a653b532-7dc1-11e7-80dc-0d4798cecd43.PNG
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DonJayamanne/javaVSCode/issues/62, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7Nxwqiv5xcIcl0-W_BekkgzckAllQBks5sW1A7gaJpZM4Oz1BX .
I replaced it and the purple 'b' is gone but it still gives me the same error.
Failed to start the program, Error: spawn C:rogram Filesavadk1.8.0_131\bin\java ENOENT
I managed to change all the "\" to "/" and now the error is
Error: Could not find or load main class launch
Oh nevermind I didn't run the debug in my java file. Everything works!
Hello. I've been reading some posts regarding setting up and the "failed to start the program" and it seems like everyone has a different issue and whenever I tried their method it doesn't work.
My tasks.json
My launch.json
I keep getting the
Also why is the 'b' in bin purple?