I imported a Java project into Code that was originally developed in Eclipse. At first, the entire "Java Projects" section in the explorer would not appear, but I did a "Clean Java language server workspace" and it appeared. However, "Referenced Libraries" does not appear:

I am not sure why this is the case. When I manually added the jars I wanted to the .classpath file, the "Referenced Libraries" appeared but said "Read-only." Further, doing a workspace clean removed these from the .classpath file, and the "Referenced Libraries" section disappeared again. Am I missing something? What can I do to get "Referenced Libraries" back?
Remove .classpath and .project files from the project folder. Then put your referenced library (for ex. jar file) file into lib folder. After you restart vscode it will be fixed.
I had this problem and solved it editing the .classpath file directly. After creating a "lib" directory aside "src" and "bin", I wrote a new line like this:
<classpathentry kind="lib" path="lib/yourlibrary.jar">
After that, I opened VScode and it recognized the referenced library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With