我已经使用 apt-get 安装了 Groovy:
sudo apt-get install groovy
现在,当查看 groovy 的目录时,在它的 lib 目录中,我发现它链接到我的系统上找不到的 jar:
$/usr/share/groovy/lib$ ls -lt
total 5360
lrwxrwxrwx 1 root root 18 Mar 15 2012 ant.jar -> ../../java/ant.jar
lrwxrwxrwx 1 root root 24 Mar 15 2012 ant-junit.jar -> ../../java/ant-junit.jar
lrwxrwxrwx 1 root root 27 Mar 15 2012 ant-launcher.jar -> ../../java/ant-launcher.jar
lrwxrwxrwx 1 root root 20 Mar 15 2012 antlr.jar -> ../../java/antlr.jar
lrwxrwxrwx 1 root root 28 Mar 15 2012 asm3-analysis.jar -> ../../java/asm3-analysis.jar
lrwxrwxrwx 1 root root 19 Mar 15 2012 asm3.jar -> ../../java/asm3.jar
lrwxrwxrwx 1 root root 24 Mar 15 2012 asm3-tree.jar -> ../../java/asm3-tree.jar
lrwxrwxrwx 1 root root 24 Mar 15 2012 asm3-util.jar -> ../../java/asm3-util.jar
lrwxrwxrwx 1 root root 18 Mar 15 2012 bsf.jar -> ../../java/bsf.jar
lrwxrwxrwx 1 root root 26 Mar 15 2012 commons-cli.jar -> ../../java/commons-cli.jar
lrwxrwxrwx 1 root root 30 Mar 15 2012 commons-logging.jar -> ../../java/commons-logging.jar
lrwxrwxrwx 1 root root 18 Mar 15 2012 ivy.jar -> ../../java/ivy.jar
lrwxrwxrwx 1 root root 20 Mar 15 2012 jansi.jar -> ../../java/jansi.jar
lrwxrwxrwx 1 root root 20 Mar 15 2012 jline.jar -> ../../java/jline.jar
lrwxrwxrwx 1 root root 22 Mar 15 2012 jsp-api.jar -> ../../java/jsp-api.jar
lrwxrwxrwx 1 root root 21 Mar 15 2012 junit4.jar -> ../../java/junit4.jar
lrwxrwxrwx 1 root root 31 Mar 15 2012 mockobjects-core.jar -> ../../java/mockobjects-core.jar
lrwxrwxrwx 1 root root 21 Mar 15 2012 regexp.jar -> ../../java/regexp.jar
lrwxrwxrwx 1 root root 26 Mar 15 2012 servlet-api.jar -> ../../java/servlet-api.jar
lrwxrwxrwx 1 root root 22 Mar 15 2012 xstream.jar -> ../../java/xstream.jar
-rw-r--r-- 1 root root 5485687 Mar 15 2012 groovy-1.8.6.jar
->
$/usr/share/groovy/lib$ ls -lt ../../java/ant.jar
ls: cannot access ../../java/ant.jar: No such file or directory
我需要知道:
- 我应该关心它吗?
- 我在 Java 中有很长时间的程序,我很少在系统范围内安装 Java 应用程序(groovy、ant、maven)(使用安装程序),所以我需要了解 ubuntu 如何在系统范围内安装这个应用程序。(我注意到 /usr/share/java -> 包含 java 库,/usr/lib/jvm -> 包含 java vm 本身,/usr/share/maven-repo/ 包含 mvn repo)