Search code examples
javavisual-studio-code

Java/VSCode "file.java is not on the classpath of project, only syntax errors are reported"


Hi I'm new to java and keep getting this error on and on in vs code. How do I solve this?


Solution

  • You can solve this by opening your current project folder in vs code, then navigate to "Java Projects" > "properties" > "clean workspace".