gpt4 book ai didi

java - openjdk-8-jdk - 缺少 src.zip?

转载 作者:行者123 更新时间:2023-12-05 01:33:49 25 4
gpt4 key购买 nike

以下是必需的信息-

apt list  | grep installed | grep -i openjdk-8-jdk

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

openjdk-8-jdk-headless/focal-security,focal-security,now 8u265-b01-0ubuntu2~20.04 amd64 [installed,automatic]
openjdk-8-jdk/focal-security,focal-security,now 8u265-b01-0ubuntu2~20.04 amd64 [installed]

要查询已安装的二进制文件,我在下面尝试了 -

$ dpkg -L openjdk-8-jdk
/.
/usr
/usr/lib
/usr/lib/jvm
/usr/lib/jvm/java-8-openjdk-amd64
/usr/lib/jvm/java-8-openjdk-amd64/bin
/usr/lib/jvm/java-8-openjdk-amd64/bin/appletviewer
/usr/lib/jvm/java-8-openjdk-amd64/bin/jconsole
/usr/lib/jvm/java-8-openjdk-amd64/include
/usr/lib/jvm/java-8-openjdk-amd64/include/jawt.h
/usr/lib/jvm/java-8-openjdk-amd64/include/linux
/usr/lib/jvm/java-8-openjdk-amd64/include/linux/jawt_md.h
/usr/lib/jvm/java-8-openjdk-amd64/lib
/usr/lib/jvm/java-8-openjdk-amd64/lib/jconsole.jar
/usr/lib/jvm/java-8-openjdk-amd64/man
/usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8
/usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1
/usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1/appletviewer.1.gz
/usr/lib/jvm/java-8-openjdk-amd64/man/ja_JP.UTF-8/man1/jconsole.1.gz
/usr/lib/jvm/java-8-openjdk-amd64/man/man1
/usr/lib/jvm/java-8-openjdk-amd64/man/man1/appletviewer.1.gz
/usr/lib/jvm/java-8-openjdk-amd64/man/man1/jconsole.1.gz
/usr/share
/usr/share/doc
/usr/share/doc/openjdk-8-jre-headless
/usr/share/doc/openjdk-8-jre-headless/test-amd64
/usr/share/doc/openjdk-8-jre-headless/test-amd64/check-hotspot-hotspot.log.gz
/usr/share/doc/openjdk-8-jre-headless/test-amd64/check-jdk-hotspot.log.gz
/usr/share/doc/openjdk-8-jre-headless/test-amd64/check-langtools-hotspot.log.gz
/usr/share/doc/openjdk-8-jre-headless/test-amd64/failed_tests-hotspot.tar.gz
/usr/share/doc/openjdk-8-jre-headless/test-amd64/jtreg-summary-hotspot.log.gz
/usr/share/doc/openjdk-8-jre-headless/test-amd64/jtreport-hotspot.tar.gz
/usr/share/doc/openjdk-8-jdk

在查看 jvm/java-8-openjdk-amd64 目录时,我看到 src.zip 的链接已损坏

$ ll
total 28
drwxr-xr-x 7 root root 4096 Sep 6 20:44 ./
drwxr-xr-x 3 root root 4096 Sep 6 20:43 ../
lrwxrwxrwx 1 root root 22 Aug 3 06:46 ASSEMBLY_EXCEPTION -> jre/ASSEMBLY_EXCEPTION
drwxr-xr-x 2 root root 4096 Sep 6 20:44 bin/
lrwxrwxrwx 1 root root 41 Aug 3 06:46 docs -> ../../../share/doc/openjdk-8-jre-headless/
drwxr-xr-x 3 root root 4096 Sep 6 20:44 include/
drwxr-xr-x 5 root root 4096 Sep 6 20:43 jre/
drwxr-xr-x 3 root root 4096 Sep 6 20:44 lib/
drwxr-xr-x 4 root root 4096 Sep 6 20:43 man/
lrwxrwxrwx 1 root root 20 Aug 3 06:46 src.zip -> ../openjdk-8/src.zip //this is in red i.e. broken
lrwxrwxrwx 1 root root 22 Aug 3 06:46 THIRD_PARTY_README -> jre/THIRD_PARTY_README

现在我该如何获取资源,我想我可以手动获取它们 - 这是我唯一的选择吗??

最佳答案

假设您正在运行 Ubuntu(Debian 也一样),openjdk-8 的源代码在包 openjdk-8-source 中.

如果您查看 filelist在包中,您会发现:

/usr/lib/jvm/openjdk-8/src.zip

可以用通常的方式安装包:

sudo apt-get install openjdk-8-source

关于java - openjdk-8-jdk - 缺少 src.zip?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64340084/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com