简体   繁体   中英

Browse referenced Java libraries in VS Code

I have VS Code set up with the Java Extension Pack. In the JAVA PROJECTS section of the sidebar I can see the files in my project as well as the referenced .jar files. The last time I used VS Code for Java development (some months ago), I could browse the source code of the referenced libraries, but now nothing happens when I unfold them.

在此处输入图片说明

If I open the same project in Eclipse, I can browse the libraries just like I used to in VS Code.

在此处输入图片说明

Is browsing referenced libraries no longer available in VS Code, or am I missing a checkmark somewhere?

Edit: I have the source code for the libraries that I'm most interested in browsing (they were developed in-house), and the .classpath file also has references to the source:

<classpathentry kind="lib" path="C:/path/to/package-2.0.2/bin/package.jar" sourcepath="C:/path/to/package-2.0.2-src/package-javasrc.zip">
    <attributes>
        <attribute name="javadoc_location" value="jar:file:/C:/path/to/package-2.0.2-doc\package-javadoc.zip!/"/>
    </attributes>
</classpathentry>

Now it's not supported to double-click .jar to check inner functions, but we can check by using the .jar class like:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM