Why do I keep getting this error in VS Code when I try to run a Java file ‘boolean org.eclipse.jdt.internal.core.SourceMethod.isMainMethodCandidate()’
I already tried to change the path, updated the extension for java but I still received the same error
2
Answers
Your problem should be due to not being able to find the entry main method. You can check there whether have an effective main method in your Java class, like
public static void main(String[] args)
. Use the commandJava:Conigure Java Runtime
to see the jdk version whether is your own version. You can clean the workspace cache with theJava:Clean the Java Language Server Workspace
command.I fixed it by installing a lower version of "Debugger for Java" extension and its steps are: