redhat-developer / redhat-developer/vscode-java

VSCode error javax.swing does not exist

Open
#1,311 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

content-assist
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Environment
  • Operating System: MacOS Catalina
  • JDK version: JAVA 8 Update 241
  • Visual Studio Code version: Version: 1.42.1
  • Java extension version: 0.8.1
Steps To Reproduce

I import as follows:-

import javax.swing.; // Error 'package javax.swing does not exist'
import java.util.ArrayList;
import java.io.
;
import java.util.StringTokenizer;

Causing error on 'JOptionPane' on every java files.

Current Result
  1. The IDE an Error on the 'import javax.swing.*' as 'package is not exist'
  2. Error on every 'JOptionPane' lines.
Additional Informations

Extension List:-
Java Extension Pack
Advance New File
Better Comments
Bracket Pair Colourizer
Checkstyle for JAVA
Code Runner
Color Highlight
Material Theme
Error Lens
GetHelp
IntelliJ Keybindings
Settings Sync
Smart Multi Cursor
Terminal
Wakatime

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the diagnostic with the listed macOS, JDK 8, VS Code, and Java extension versions using a Java file that imports javax.swing and references JOptionPane. Check how the Java extension resolves the project JDK and class path; done means those imports and references no longer produce diagnostics.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.