在debian 10上,我使用安装Java SE 10 apt-get install openjdk-10-jdk openjdk-10-doc
。我打电话来jshell
并想获取的文档System.out.println(...)
,但出现了一个错误<no documentation found>
:
| Welcome to JShell -- Version 10.0.1
| For an introduction type: /help intro
jshell> System.out.println( **<tab>**
Signatures:
void PrintStream.println()
void PrintStream.println(boolean x)
void PrintStream.println(char x)
void PrintStream.println(int x)
void PrintStream.println(long x)
void PrintStream.println(float x)
void PrintStream.println(double x)
void PrintStream.println(char[] x)
void PrintStream.println(String x)
void PrintStream.println(Object x)
<press tab again to see documentation>
jshell> System.out.println( **<tab>**
void PrintStream.println()
<no documentation found>
<press tab to see next documentation>
jshell> /env
jshell> System.out.println(System.getProperty("java.class.path"))
.
jshell>
我认为这与如何在JShell中提供javadoc文档有关?因为我想获取一些标准方法的文档。(此问题以错误https://bugs.openjdk.java.net/browse/JDK-8188142结尾。问题是类路径未正确定义)。
我如何获得文件jshell
?
如果您使用的是基于Debian的系统,则必须安装该openjdk-<vserion>-source
软件包才能使用JShell的文档。在您的情况下,您将需要执行
sudo apt install openjdk-10-source
您可以通过JShell中双标签获得的文档来自/usr/lib/jvm/java-<version>-openjdk-amd64/lib/source.zip
文件,该文件是安装openjdk-<vserion>-source
软件包之前的无效链接。链接指向../../openjdk-<vserion>/src.zip
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句