简体   繁体   English

DOS上的Java命令

[英]java command on DOS

with javap java.lang.Object we are able to see the methods signature under it, where as with javap javax.servlet.ServletConfig we are not able to see it. 使用javap java.lang.Object,我们可以看到它下面的方法签名,而使用javap javax.servlet.ServletConfig时,我们看不到它。

Could any one please suggest any command for checking the method signatures for javax.servlet.ServletConfig 有人可以建议使用任何命令来检查javax.servlet.ServletConfig的方法签名吗?

I don't know if you specifically want a local tool to find the signature, however the best bet is always to look at the API documentation. 我不知道您是否特别希望使用本地工具来查找签名,但是最好的选择始终是查看API文档。 A google search of the fully qualified class name leads straight to the official API documentation . 谷歌搜索完全限定的类名直接导致正式的API文档 This will not only show you the method signatures, but often give you valuable contextual information well beyond an argument name or type. 这不仅会向您显示方法签名,而且通常会为您提供有价值的上下文信息,而不仅仅是参数名称或类型。

你应该做

java -cp <location-of-servlet-api-jar> javax.servlet.ServletConfig

You will need to locate your servlet-api.jar file and issue the following command: 您将需要找到servlet-api.jar文件并发出以下命令:

javap -classpath javax.servlet.ServletConfig javap -classpath javax.servlet.ServletConfig

substitute with the path to your servlet-api-.jar 用您的servlet-api-.jar的路径替换

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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