Reputation: 201
In my Java application, Visual Studio Code throws the following error for all my non-java imports:
package this.is.a.package does not exist (compiler.err.doesnt.exist)
This error appeared a few days ago. Before that my projects and imports where working just fine. I tried to reinstall VSC several times, rebooted my Mac and deleted all files in $HOME/Library/Application Support/Code/User/workspaceStorage/
as suggested by this feed (Visual Studio Code - Java - Import Errors and More). The Java application compiles just fine in IntelliJ IDEA. Therefore, the file structure should be correct.
The error appears after the installation of the Java Language Support (https://marketplace.visualstudio.com/items?itemName=georgewfraser.vscode-javac) extension.
Upvotes: 3
Views: 2474
Reputation: 11
I had the same issue and finally after uninstalling the Java Language Support the problem was resolved. Thank you!
Upvotes: 1
Reputation: 201
Eventually I solved this issue by deleting the content of the settings.json file and replace it with some standard entries.
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"files.autoSave": "afterDelay",
"java.semanticHighlighting.enabled": true,
"java.jdt.ls.vmargs": "",
"java.import.gradle.jvmArguments": ""
}
Upvotes: 1
Reputation: 8411
maybe, you can try the "Java Extension Pack" extension in the marketplace. as the 'Language Support for Java(TM) by Red Hat' under the pack can provide you the ability of compile.
Upvotes: -1