vscode-java: Gradle compiles but vscode-java is getting compilation errors
I’ve pushed related code on https://github.com/jeusdi/gradle-vscode.git
gradle compileJava runs correctly, but vscode-java is getting me compilation errors.
Environment
- Operating System: Ubuntu 18.04
- JDK version: JDK 11
- Visual Studio Code version: 1.31.0
- Java extension version: 0.38.0
Steps To Reproduce
- git clone https://github.com/jeusdi/gradle-vscode.git
- Open vscode
[attach a sample project reproducing the error] attach logs
Current Result

Expected Result
gradle command ends succesfully:

Additional Informations
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 14
- Comments: 22 (6 by maintainers)
I had the same issue and this solved the issue. If the files are already in the correct directory, press F1 and type in “Clean the Java Language Server Workspace”
I just tried the sample project with the newest extension (1.4.0) and found this issue has been solved. As @IndikaMaligaspe said, for those you had open this workspace before, you can clean the java language server workspace and reload VS Code, it will work.