'No "referenced libraries" in VS Code Java project
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?
Solution 1:[1]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | pserey |