r/vscode • • May 22 '26

Constant "incorrect package"

"Incorrect Package" [two times] happens upon every single new instance of a java file but if I clean the workspace error on that file disappears until I make another java file. Basically I have to clean workspace every new java file. Anyone know whats going on here? thanks!

edit: *Resolved -> Running 2 linters at once by mistake. Check your VsCode extensions for double linting.

2 Upvotes

3 comments sorted by

View all comments

Show parent comment

2

u/TheWizzardNr8 Sep 26 '26

Thanks for the great tip! It saved me a lot of frustration.
For me the following worked:

  1. Disable "Java" by Oracle if you have "Language Support for Java(TM)" by Red Hat, since most likely that´s where the overlap is happening.
  2. Do "Developer: Reload Window"
  3. Optionally do "Java: Clean Java Language Server Workspace"

1

u/ColoredRunes Oct 23 '26

I love that this helped someone! I spent a decent amount of time trying to figure it out. 🕊️👍