redhat-developer / redhat-developer/vscode-java
No autocompletions in Java 1.8-based projects due to "Missing system library" error
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 546
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
Mô tả
This appears to be related to eclipse-jdt/eclipse.jdt.core#3298. I'm not sure when this changed but as of the update released yesterday I am now getting the following error in my logs any time I try to work on my Minecraft mod projects (e.g. glektarssza/minecraft-gtnh-customizer):
!ENTRY org.eclipse.jdt.core.manipulation 4 0 2025-10-29 09:43:37.638
!MESSAGE Error in JDT Core during AST creation
!STACK 0
java.lang.IllegalStateException: Missing system library
at org.eclipse.jdt.core.dom.ASTParser.checkForSystemLibrary(ASTParser.java:311)
at org.eclipse.jdt.core.dom.ASTParser.getClasspath(ASTParser.java:269)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateASTCached(ASTParser.java:1395)
at org.eclipse.jdt.core.dom.ASTParser.lambda$1(ASTParser.java:1274)
at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5709)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1274)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:918)
at org.eclipse.jdt.core.manipulation.CoreASTProvider$1.run(CoreASTProvider.java:294)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(CoreASTProvider.java:286)
at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:199)
at org.eclipse.jdt.ls.core.internal.JDTUtils.getAst(JDTUtils.java:1953)
at org.eclipse.jdt.ls.core.internal.handlers.SemanticTokensHandler.full(SemanticTokensHandler.java:45)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$57(JDTLanguageServer.java:1205)
at org.eclipse.jdt.ls.core.internal.BaseJDTLanguageServer.lambda$0(BaseJDTLanguageServer.java:87)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:667)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:504)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
To replicate the issue:
- Ensure you have Git LFS installed properly (see this comment on redhat-developer/vscode-java#4218 for why).
- Clone the repository.
- Install the extensions outlined in the
Enabled Extensions Informationsection below. - Copy the appropriate template VSCode settings from
./templates/vscode/from inside the repository above into your./.vscode/settings.jsonfile inside the repository above. - Replace the Java paths inside the copied templates to a version of Java 21.
- Ensure your
JAVA_HOMEenvironment variable is set to a version of Java 17. - Run
./gradlew setupDecompWorkspaceinside the repository above. - Run
./gradlew buildinside the repository above. - Run
./gradlew eclipseinside the repository above. - Try to get autocompletion in any file.
- Observe the issue.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với repository tái hiện lỗi, các thiết lập trong templates/vscode/ và những lệnh Gradle được liệt kê trong issue. Theo dõi lỗi Missing system library qua ASTParser, CoreASTProvider, JDTUtils và SemanticTokensHandler, sau đó so sánh hành vi với thiết lập dự án Java 1.8. Công việc được xem là hoàn tất khi tính năng tự động hoàn thành hoạt động mà không có lỗi được ghi lại sau khi lặp lại phần thiết lập đã liệt kê.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, typescript
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 28/100