redhat-developer / redhat-developer/vscode-java
Classes compile outside vscode in CLI, but in vs-code problem section displays errors and editor highlights code lines in red
@snjeza 已经在做这个了。
开始于 2020年11月4日。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
Java Code is compiling neatly, outside the Vs-Code IDE i.e., from command line and other IDE's like IntelliJ, but when I import my project into VS-Code there are some errors displayed in problems section. Some of them are shown here with screenshots
Environment
- Operating System: Windows 10
- JDK version: 1.8 - J9 VM
- Visual Studio Code version: 1.47.2
- Java extension version: v0.64
- Build tool: Gradle, wrapper version, 4.8.1
Steps To Reproduce the
- Create a project having src/main/resources and add your java code directly inside src\main
Java Model Exception: Java Model Status [Cannot nest '<project>/src/main/resources' inside '<project>/src/main'. To enable the nesting exclude 'resources/' from 'junit_tests/src/main']
Current Result
-
Below is the Java language server log file excerpt

-
I have tried excluding the resources folder, but no luck, problems section still has this.
-
All these compile times issues or problems shown in the problems section in vsc-code are not detected in IntelliJ IDE. Not sure why the is is happening.
-
The code/java intellisense cannot trace the relationship between so, red marks with lines highlighted is shown, but actually that's not the case, as the classes are compiled perfectly from command line.
-
Some of the compiler issues, shown in the problems section are
- -
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。