redhat-developer / redhat-developer/vscode-java
Package Does Not Exist Error; Project builds and Runs OK.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
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
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by loading the folder in VS Code with the attached HelloWorld.java source and settings.json, then inspect the errors and Log.pdf. Compare the editor's package-not-found diagnostics with the command-line build and runtime behavior. Done means the external JAR is recognized by the Java extension and no corresponding linting errors appear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100