Closed clankill3r closed 7 years ago
(O yeah, the readme of this repository contains a lot of fields that are deprecated).
Yes, a better README is needed. :sweat_smile:
I don't know what is your issue, I was able to debug your java code with the config you show me.
On Linux JAVA_HOME
is /usr/lib/jvm/default
and works well. :sweat_smile:
In case it helps:
This is the terminal output:
> Executing task: javac -g /Users/doekewartena/Desktop/temp/VSCODE_tests/java/Test.java <
Terminal will be reused by tasks, press any key to close it.
The terminal output show that your javac
is working well.
Maybe you should replace "${env:JAVA_HOME}/bin"
by an absolute path where bin
folder is located.
Yeah that worked! Is that a bug in VSCode?
Maybe, I don't know, my VSCode is working well with "${env:JAVA_HOME}/bin
Yeah that worked!
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [
{
"name": "Java",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"jdkPath": "${env:JAVA_HOME}",
"cwd": "${fileDirname}",
"startupClass": "${fileBasenameNoExtension}",
"classpath": [
".",
"${fileDirname}"
]
},
{
"name": "Java Console App",
"type": "java",
"request": "launch",
"stopOnEntry": true,
"jdkPath": "${env:JAVA_HOME}",
"cwd": "${fileDirname}",
"startupClass": "${fileBasenameNoExtension}",
"classpath": [
".",
"${fileDirname}"
],
"externalConsole": true
}
]
}
Here is my launch.json. When I try to start debugger, it says Error: Could not find or load main class Authors Any thoughts ?
Try replacing "jdkPath": "${env:JAVA_HOME}",
by "jdkPath": "${env:JAVA_HOME}/bin",
That was the initial generated thing and I did replace it to "jdkPath": "${env:JAVA_HOME}". With "jdkPath": "${env:JAVA_HOME}/bin", I see
Ok, try to use absolute path for JDK instead
Tried that too. It goes back to my initial issue again :( Error: Could not find or load main class Authors
Never mind. I think I have an issue with my Java file. Tried with a new one and that worked. Thanks for quick response.
When I try to debug I get the following error:
Platform OSX. The JAVA_HOME is set, if I
echo $JAVA_HOME
I get/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
(which exists).My tasks looks like this:
and launch looks like this:
This is the code I try to run:
(O yeah, the readme of this repository contains a lot of fields that are deprecated).