redhat-developer / redhat-developer/vscode-java

Package Does Not Exist Error; Project builds and Runs OK.

未关闭
#3,832 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
2.3k
派生
547
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

Building a simple HelloWorld app to test importing an external .JAR file
The Jar was built with an earlier version of the JDK but builds on the command line without issues.
The linter indicates that the import class "Media" does not exist even though the jar file has been referenced.
The App runs OK without any errors. Where are these errors being reported from? It looks as it's a Red Hat response.

Environment
  • Operating System: Windows 10
  • JDK version: 17.0.13
  • Visual Studio Code version: 1.94.2
  • Java extension version: 1.35.1 (Language Support for Java by Red Hat.
Steps To Reproduce

Just load the folder containing the HelloWorld.java file into VSCode and the errors show up straight away.
Run the app with or without the debugger and it runs ok.

Source, (java file):
HelloWorld.txt

Log.pdf

settings:
settings.json

Current Result

indicates that package does not exist event though it builds ok.

Expected Result

no linting errors.

Additional Information

let me know what else I can provide

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先在 VS Code 中加载包含所附 HelloWorld.java 源文件和 settings.json 的文件夹,然后检查错误和 Log.pdf。将编辑器关于找不到 package 的诊断与命令行 build 和 runtime 行为进行比较。当 Java 扩展识别出外部 JAR 且不再出现相应的 linting 错误时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, vscode
领域
tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。