Reputation: 15
I don't know why I'm getting a classpath not found error in VS Code when I open more than one java program in the same workspace. Also sometimes this error shows up even when I open a single project and run the program. Is there any solution for this problem?
Upvotes: 0
Views: 2143
Reputation: 9461
Usually it can be fixed by right clicking the project and choosing Add Folder to Java Source Path, after that, it may throw another error:
Click Quick Fix and add package declaration, you can run .java file successfully:
Upvotes: 2