No errors are displayed, build error
See original GitHub issueHi, my project uses java 1.8, jdtls startup script:
/usr/lib/jvm/java-17-openjdk/bin/java \
-javaagent:/home/user/.m2/repository/org/projectlombok/lombok/1.18.24/lombok-1.18.24.jar \
-Xbootclasspath/a:/home/user/.m2/repository/org/projectlombok/lombok/1.18.24/lombok-1.18.24.jar \
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
-Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-Dlog.protocol=true \
-Dlog.level=ALL \
-Xms1g \
-Xmx2G \
-jar /opt/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar \
-configuration /opt/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/config_linux \
-data "${1:-$HOME/workspace}" \
--add-modules=ALL-SYSTEM \
--add-opens java.base/java.util=ALL-UNNAMED \
--add-opens java.base/java.lang=ALL-UNNAMED
lsp log:
4 [TRACE][2022-09-08 16:44:06] .../lua/vim/lsp.lua:792 "notification" "language/progressReport" { complete = true, id = "d81256a8-6432-4c38-b82a-3608bfd9a11f", status = "100% ", subTask = "", task = "Building", totalWork = 1000, workDone = 1000}
3 [TRACE][2022-09-08 16:44:06] .../lua/vim/lsp.lua:792 "notification" "textDocument/publishDiagnostics" { diagnostics = { { code = "0", message = "The compiler compliance specified is 1.8 but a JRE 17 is used", range = { end = { character = 0, line = 0 }, start = { character = 0, line = 0 } }, severity = 2, source = "Java" }, { code = "0", message = "Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment. ", range = { end = { character = 0, line = 0 }, start = { character = 0, line = 0 } }, severity = 2, source = "Java" } }, uri = "file:///work/project1"}
2 [TRACE][2022-09-08 16:44:06] ...lsp/handlers.lua:488 "default_handler" "textDocument/publishDiagnostics" { ctx = '{\n client_id = 1,\n method = "textDocument/publishDiagnostics"\n}', result = { diagnostics = { { code = "0", message = "The compiler compliance specified is 1.8 but a JRE 17 is used", range = { end = { character = 0, line = 0 }, start = { character = 0, line = 0 } }, severity = 2, source = "Java" }, { code = "0", message = "Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the wo rkspace that are strictly compatible with this environment. ", range = { end = { character = 0, line = 0 }, start = { character = 0, line = 0 } }, severity = 2, source = "Java" } }, uri = "file:///work/project1" }}
1 [TRACE][2022-09-08 16:44:06] .../lua/vim/lsp.lua:792 "notification" "textDocument/publishDiagnostics" { diagnostics = {}, uri = "file:///work/project1/pom.xml"}
0 [TRACE][2022-09-08 16:44:06] ...lsp/handlers.lua:488 "default_handler" "textDocument/publishDiagnostics" { ctx = '{\n client_id = 1,\n method = "textDocument/publishDiagnostics"\n}', result = { diagnostics = {}, uri = "file:///work/project1/pom.xml" }}
1 [TRACE][2022-09-08 16:44:06] .../lua/vim/lsp.lua:792 "notification" "language/progressReport" { complete = true, id = "d81256a8-6432-4c38-b82a-3608bfd9a11f", status = "100% ", subTask = "", task = "Building", totalWork = 1000, workDone = 1000}
2 [TRACE][2022-09-08 16:44:06] .../lua/vim/lsp.lua:792 "notification" "window/logMessage" { message = "Sep 8, 2022, 4:44:06 PM Errors occurred during the build.", type = 1}
3 [TRACE][2022-09-08 16:44:06] ...lsp/handlers.lua:488 "default_handler" "window/logMessage" { ctx = '{\n client_id = 1,\n method = "window/logMessage"\n}', result = { message = "Sep 8, 2022, 4:44:06 PM Errors occurred during the build.", type = 1 }}
4 [ERROR][2022-09-08 16:44:06] ...lsp/handlers.lua:455 "Sep 8, 2022, 4:44:06 PM Errors occurred during the build."
message = "Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment...
How do I set path to jvm in the settings? My jvm’s l /usr/lib/jvm/:
lrwxrwxrwx 1 14 root root 8 Sep 15:42 default -> java-8-openjdk
lrwxrwxrwx 1 14 root root 8 Sep 15:42 default-runtime -> java-8-openjdk
drwxr-xr-x 6 - root root 7 Aug 10:10 java-8-openjdk
drwxr-xr-x 7 - root root 19 Aug 16:59 java-11-openjdk
drwxr-xr-x 7 - root root 19 Aug 16:59 java-17-openjdk
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No errors displayed in the "Error List" (error list doesn't show ...
I have a compiler error and my error list is empty. switching from "Build + Intellisense" to "Build" shows the error in the...
Read more >Visual Studio Shows Build Failed But No Errors are Displayed
This is often an issue of framework mismatch, especially when you've added references to new projects within a solution. Check the project ...
Read more >Visual Studio 2022 build failed - but showing no errors
I was trying to refer to a project (v4.8) from v4.6 and encountered this error. And also try checking the build order of...
Read more >Oh dear! Build errors? - LoopDocs - GitHub Pages
Solution: This error message has recently started to appear for some new Loop builders. To resolve the issue, please log in to your...
Read more >VS 2022 won't show build failure errors in the Error List from ...
VS 2022 won't show build failure errors in the Error List from razor files that aren't currently open. Does anyone know of a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Thank you! Removing
-Xbootclasspath/a:...lombok-1.18.24.jarfixed it for me.Does the comment at https://github.com/redhat-developer/vscode-java/issues/652#issuecomment-466906125 help ? I’ve seen a few of these types of issues and it generally seems to be about lombok.
https://github.com/emacs-lsp/lsp-java/issues/54#issuecomment-553995773