Visual Studio Code : jar import error - package does not exist

3 weeks ago 24
ARTICLE AD BOX

When referencing an external library (.jar) with an import, i get the error "package ... does not exist".

I precised that compilation is OK (when i print in the console, changes are considered). I think so that it's just a problem of VS Code configuration/state.

I am really stuck by this error since some days (screenshot provided)

My steps :

Created a java project (no build tools)

Added a referenced library (official org.apache.commons.io JAR file) in 2 ways :

Add package with the "plus" button of the "referenced libraries" section Configure settings to discover referenced libraries in the lib folder: when adding a new package in the lib folder, it is automatically discovered and added to the referenced libraries

Added the import "org.apache.commons.io in the app.java file

Some help would be appreciated.

enter image description here

Regards, Nicolas

Read Entire Article